Re: [GENERAL] pgdump (9.2.4) not dumping all tables

2014-11-21 Thread Albe Laurenz
Marcos Cano wrote: [missing data after dump/restore of DB with PostGIS] i found this in the file... ERROR: could not access file $libdir/rtpostgis-2.0: No such file or directory Could it be that PostGIS was not installed as an extension in the old database, so that the dump contains the

Re: [GENERAL] Performance question

2014-11-21 Thread Albe Laurenz
Anil Menon wrote: I would like to ask from your experience which would be the best generic method for checking if row sets of a certain condition exists in a PLPGSQL function. I know of 4 methods so far (please feel free to add if I missed out any others) [...] Are you aware that all of

[GENERAL] Detecting master/slave

2014-11-21 Thread Steve Pribyl
Is there a better/recommended way to determine which host in a cluster is the master or slave besides rescue.conf or pg_stat_replication? Just looking for the right way to know which host is which. Thanks Steve [http://www.akunacapital.com/images/akuna.png]

Re: [GENERAL] Detecting master/slave

2014-11-21 Thread Nitesh Gupta
Hey steve , You can by using grep command Ps -ewf | grep PostgreSQL If you find sender process is running that will be master if you will see receiver process then that will be slave In addition to this you can also use Edb fail over manager for more status

Re: [GENERAL] Detecting master/slave

2014-11-21 Thread Thomas Kellerer
Steve Pribyl schrieb am 21.11.2014 um 15:13: Is there a better/recommended way to determine which host in a cluster is the master or slave besides rescue.conf or pg_stat_replication? Just looking for the right way to know which host is which. What about select pg_is_in_recovery()

Re: [GENERAL] Detecting master/slave

2014-11-21 Thread Sameer Kumar
On 21 Nov 2014 22:14, Steve Pribyl steve.pri...@akunacapital.com wrote: Is there a better/recommended way to determine which host in a cluster is the master or slave besides rescue.conf or pg_stat_replication? Just looking for the right way to know which host is which. You may query select

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Nestor A. Diaz
On 11/20/2014 12:18 PM, Adrian Klaver wrote: What query? How is it executed? Hi Adrian, this is one of the queries that appear to consume all resources, we use a CTE approach (with) because in 9.1 _sometimes_ the planner perform an order by before doing the joins something that was killing the

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Bill Moran
On Fri, 21 Nov 2014 09:54:43 -0500 Nestor A. Diaz nes...@tiendalinux.com wrote: On 11/20/2014 12:18 PM, Adrian Klaver wrote: What query? How is it executed? Hi Adrian, this is one of the queries that appear to consume all resources, we use a CTE approach (with) because in 9.1

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Tom Lane
Nestor A. Diaz nes...@tiendalinux.com writes: As you can see from above it creates a lots of temp files for the same query. And finally the query is this: Could we see what EXPLAIN says about that? You might try EXPLAIN ANALYZE too, but we're expecting that to run out of disk space :-(. I'm

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Adrian Klaver
On 11/21/2014 06:54 AM, Nestor A. Diaz wrote: On 11/20/2014 12:18 PM, Adrian Klaver wrote: What query? How is it executed? Hi Adrian, this is one of the queries that appear to consume all resources, we use a CTE approach (with) because in 9.1 _sometimes_ the planner perform an order by

Re: [GENERAL] deferring ForeignKey checks when you didn't set a deferrable constraint ?

2014-11-21 Thread Jonathan Vanasco
On Nov 20, 2014, at 6:00 PM, Melvin Davidson wrote: Try the following queries. It will give you two .sql files (create_fkeys.sql drop_fkeys.sql). Thanks! I tried a variation of that to create DEFERRABLE constraints, and that was a mess. It appears all the checks ran at the end of the

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Nestor A. Diaz
On 11/21/2014 10:10 AM, Bill Moran wrote: Are you saying that the _exact_ same query is executed about one hundred times at approximately the same time? Hi, I am telling that the query got logged one hundred times in the csv log and also at the postgres log, so I am not sure if the query is

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Tom Lane
Nestor A. Diaz nes...@tiendalinux.com writes: On 11/21/2014 10:15 AM, Tom Lane wrote: Could we see what EXPLAIN says about that? look at this query (this use partitioning with table inheritance): I asked for an EXPLAIN of the problematic query, not something weakly related to it :-(.

Re: [GENERAL] better architecture?

2014-11-21 Thread zach cruise
On 11/20/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/20/2014 04:57 PM, zach cruise wrote: On 11/20/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/20/2014 12:30 PM, zach cruise wrote: For more info see: