Re: [GENERAL] Postgres 9.0 Streaming Replication and Load Balancing?

2012-05-17 Thread Sumit Raja
Unsure you can achieve this without a read only and a read write application set up, I've always had RW application servers separate from RO ones. You could disable the application connection pool completely and let pg-pool do the pooling for you (not sure of performance impact, if any) as the

[GENERAL] Is EXISTS the most efficient approach for PostgreSql to check for existence of nodes in a tree?

2012-05-17 Thread Seref Arikan
I have a key value table in my Postgresql db, which represents hierarchical data through parent_feature_mapping column that points to id of feature_mapping_id column of the same table. I need to select root nodes that has children which satisfy various conditions. The conditions may extend to

Re: [GENERAL] Is EXISTS the most efficient approach for PostgreSql to check for existence of nodes in a tree?

2012-05-17 Thread Rob Sargentg
On 05/17/2012 03:06 AM, Seref Arikan wrote: I have a key value table in my Postgresql db, which represents hierarchical data through parent_feature_mapping column that points to id of feature_mapping_id column of the same table. I need to select root nodes that has children which satisfy

Re: [GENERAL] Postgres 9.0 Streaming Replication and Load Balancing?

2012-05-17 Thread Paulo Correia
Yes, that was the results of our tests ... It seems we'll have to do a lot of work on the application to separate the queries in order to achieve the load-balancing. Thanks anyway, Best regards, Paulo Correia On 17/05/12 09:32, Sumit Raja wrote: Unsure you can achieve this without a read

[GENERAL] cannot compile www_fdw Foreign Data Wrapper

2012-05-17 Thread Adrian Schreyer
Hi all, I am trying to compile the www_fdw foreign data wrapper on PostgreSQL 9.2 beta but I am getting the following error: cp sql/www_fdw.sql sql/www_fdw--0.1.0.sql gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -DLINUX_OOM_ADJ=0

[GENERAL] Re: Is EXISTS the most efficient approach for PostgreSql to check for existence of nodes in a tree?

2012-05-17 Thread Seref Arikan
Trying to reply to Rob: Apologies if this does not end up in the thread (gmail is just driving me mad, I can't seem to receive messages, so I've subscribed again) For some reason Limit 1 cause my query to go on for minutes without a response, which was not the case. The following query takes

Re: [GENERAL] cannot compile www_fdw Foreign Data Wrapper

2012-05-17 Thread Tom Lane
Adrian Schreyer ams...@cam.ac.uk writes: I am trying to compile the www_fdw foreign data wrapper on PostgreSQL 9.2 beta but I am getting the following error: We changed the planner API for foreign data wrappers in 9.2, so you won't be able to compile 9.1 FDWs until their code is updated.

Re: [GENERAL] difference in query plan when db is restored

2012-05-17 Thread John Watts
No change I'm afraid :( -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: 17 May 2012 22:59 To: John Watts Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] difference in query plan when db is restored John Watts jwa...@promotion-update.com writes: I have a

[GENERAL] How to write a script to analyze and vacuum all the tables in the system catalog?Thanks.

2012-05-17 Thread leaf_yxj
Hi Guys. Please help me about this. For postgres database, it looks like we need analyze and vacuum all the tables periodly. I need to write a script which can be executed in crontab. I don't have any clues about that. I only know the command : analyze tablename; vacuum tablename; Please

[GENERAL] How to debug the performance issues via which system catalog.Thanks.

2012-05-17 Thread leaf_yxj
I know we can know the currenct activity via pg_stat_activity. What's else you guys use to debug. And for some times back, how can we check the activities? Thanks. Grace -- View this message in context:

Re: [GENERAL] How to write a script to analyze and vacuum all the tables in the system catalog?Thanks.

2012-05-17 Thread Steve Crawford
On 05/17/2012 11:30 AM, leaf_yxj wrote: Hi Guys. Please help me about this. For postgres database, it looks like we need analyze and vacuum all the tables periodly. I need to write a script which can be executed in crontab. I don't have any clues about that. I only know the command : analyze

Re: [GENERAL] How to debug the performance issues via which system catalog.Thanks.

2012-05-17 Thread Steve Crawford
On 05/17/2012 11:54 AM, leaf_yxj wrote: I know we can know the currenct activity via pg_stat_activity. What's else you guys use to debug. And for some times back, how can we check the activities? Thanks. Grace Performance is a complex enough issue to warrant its own mailing list (CPU type,

[GENERAL] Replication recovery?

2012-05-17 Thread John Mudd
Sorry if this is a dumb question. Feel free to just point me to a doc. I've read a little about Postgres replication and the concept of a master and one or more slaves. If one db is down then you just switch to one that's still running. There's even additional software like pgpool to make the

[GENERAL] Reasons for postgres processes beeing killed by SIGNAL 9?

2012-05-17 Thread Clemens Eisserer
Hi, Recently single postgres processes are killed by SIGNAL 9 on our virtual vvmware managed server without any manual interaction - causing lost transactions. Any ideas what could be the reason? Could postmaster the source of the signal? We are running postgreql 8.4.7 on Linux 64-bit. Thank

[GENERAL] difference in query plan when db is restored

2012-05-17 Thread John Watts
Hi folks, I have a database query which executes normal (under 1s) with 21 steps according to the query paln. However, when the database is dumped and restored on the _same_ PostgreSQL server, the query plan takes 34 steps to complete and it executes in excess of 90 seconds! Why is the query

Re: [GENERAL] difference in query plan when db is restored

2012-05-17 Thread Tom Lane
John Watts jwa...@promotion-update.com writes: I have a database query which executes normal (under 1s) with 21 steps according to the query paln. However, when the database is dumped and restored on the _same_ PostgreSQL server, the query plan takes 34 steps to complete and it executes in

Re: [GENERAL] Reasons for postgres processes beeing killed by SIGNAL 9?

2012-05-17 Thread Steve Crawford
On 05/17/2012 03:44 PM, Clemens Eisserer wrote: Hi, Recently single postgres processes are killed by SIGNAL 9 on our virtual vvmware managed server without any manual interaction - causing lost transactions. Any ideas what could be the reason? Could postmaster the source of the signal? We are