Re: [GENERAL] Performance question

2014-11-20 Thread Anil Menon
Thanks Adrian On Thu, Nov 20, 2014 at 3:46 AM, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/19/2014 08:26 AM, Anil Menon wrote: Hello, 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

Re: [GENERAL] Modeling Friendship Relationships

2014-11-20 Thread Robert DiFalco
Thanks Jonathan. So in your use case would you put non-approved friend requests in this table as non-reciprocal? If so, did the person requesting friendship get the row in there or the person receiving the friend request? Also, if A and B are friends, and B decided to remove A as a friend, are you

Re: [GENERAL] better architecture?

2014-11-20 Thread Adrian Klaver
On 11/19/2014 05:58 PM, zach cruise wrote: i need some advice: 1. for our small business, i have a master (dev) - slave (prod) setup. i develop using the master. i get data from other people's dev (mssql) databases. i also get data from their prod (mssql) databases. i replicate everything on

Re: [GENERAL] Modeling Friendship Relationships

2014-11-20 Thread Alvaro Herrera
Robert DiFalco wrote: I have a question about modeling a mutual relationship. It seems basic but I can't decide, maybe it is 6 of one a half dozen of the other. In my system any user might be friends with another user, that means they have a reciprocal friend relationship. It seems I have

Re: [GENERAL] better architecture?

2014-11-20 Thread zach cruise
combining replies for the list: On 11/19/14, Charles Zaffery charl...@focusschoolsoftware.com wrote: 2 and 3 can be covered by this: http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster does something similar exist for windows? On 11/20/14, Michael Paquier michael.paqu...@gmail.com wrote:

[GENERAL] pgsql_tmp consuming all inodes

2014-11-20 Thread Nestor A. Diaz
Hello People. I have installed a postgres engine: PostgreSQL 8.4.22 on x86_64-unknown-linux-gnu, compiled by GCC gcc (Debian 4.7.2-5) 4.7.2, 64-bit from debian packages at postgresql official repository running on debian wheezy 7.7 64 bit. I have a couple of databases running on a cluster, and

Re: [GENERAL] [sfpug] Linuxfest 2015 Call for Papers

2014-11-20 Thread David Gallagher
Hmm, end of January in Bellingham... Sounds like a great excuse to ski Mt Baker and beyond :D. -David On Nov 19, 2014, at 12:09 PM, Josh Berkus j...@agliodbs.com wrote: On 11/19/2014 11:57 AM, Adrian Klaver wrote: So as not to have lost souls wandering around Seattle in April, LFNW is

Re: [GENERAL] [sfpug] Linuxfest 2015 Call for Papers

2014-11-20 Thread Joshua D. Drake
On 11/20/2014 08:21 AM, David Gallagher wrote: Hmm, end of January in Bellingham... Sounds like a great excuse to ski Mt Baker and beyond :D. What I find funny is that Mt. Baker (mtbaker.us) is actually the resorts on Mt. Shuksan. Which is not-arguably more beautiful :D JD -- Command

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-20 Thread Tom Lane
Nestor A. Diaz nes...@tiendalinux.com writes: I have a couple of databases running on a cluster, and two of them have been experiencing the following behavior since installed yesterday: They create a lot of files under directory pgsql_tmp up to the point they consume all the inodes, when I do

Re: [GENERAL] [sfpug] Linuxfest 2015 Call for Papers

2014-11-20 Thread Adrian Klaver
On 11/20/2014 08:21 AM, David Gallagher wrote: Hmm, end of January in Bellingham... Sounds like a great excuse to ski Mt Baker and beyond :D. FYI the Bellingham event is at end of April. Trying to avoid the Have You Seen Me? being repeated at Heather Meadows:) -David On Nov 19, 2014, at

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-20 Thread Adrian Klaver
On 11/20/2014 08:20 AM, Nestor A. Diaz wrote: Hello People. I have installed a postgres engine: PostgreSQL 8.4.22 on x86_64-unknown-linux-gnu, compiled by GCC gcc (Debian 4.7.2-5) 4.7.2, 64-bit from debian packages at postgresql official repository running on debian wheezy 7.7 64 bit. I have

[GENERAL] Transactions to create pg_multixact members and offsets

2014-11-20 Thread Dev Kumkar
Hellos, How to manually increase pg_multixact members and offsets? Does a transaction waiting for exclusive lock or shared lock result into entry being created in pg_multixact? Excerpt of multixact.c: /*- 2 * 3 *

Re: [GENERAL] better architecture?

2014-11-20 Thread Adrian Klaver
On 11/20/2014 08:00 AM, zach cruise wrote: combining replies for the list: On 11/19/14, Charles Zaffery charl...@focusschoolsoftware.com wrote: 2 and 3 can be covered by this: http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster does something similar exist for windows? On 11/20/14,

Re: [GENERAL] Transactions to create pg_multixact members and offsets

2014-11-20 Thread Alvaro Herrera
Dev Kumkar wrote: Hellos, How to manually increase pg_multixact members and offsets? Search for burnmulti in the archives, which is a contrib module to test pg_multixact. Does a transaction waiting for exclusive lock or shared lock result into entry being created in pg_multixact? Merely

[GENERAL] pgdump (9.2.4) not dumping all tables

2014-11-20 Thread Marcos Cano
hello im trying to dump a complete DB, i've been doing something like this. (i'm in the process of upgrading from 9.2.4 to 9.3.5) my current DB looks like this: Name| Owner | Encoding | Collate | Ctype | Access privileges

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

2014-11-20 Thread Tom Lane
Marcos Cano mc...@stsa.info writes: everything seems to work fine until i noticed that i'm missing 5 tables, Did you look at the error output from the restore to see if there were any complaints? regards, tom lane -- Sent via pgsql-general mailing list

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

2014-11-20 Thread Marcos Cano
might be awkard but there is no file, so i assume 2 things: 1) there was no upgrade errors 2) the script + command is not writing to stderr (i think it is doing it) -- View this message in context: http://postgresql.nabble.com/pgdump-9-2-4-not-dumping-all-tables-tp5827736p5827739.html Sent

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

2014-11-20 Thread Adrian Klaver
On 11/20/2014 09:47 AM, Marcos Cano wrote: hello im trying to dump a complete DB, i've been doing something like this. (i'm in the process of upgrading from 9.2.4 to 9.3.5) my current DB looks like this: Name| Owner | Encoding | Collate | Ctype | Access privileges

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

2014-11-20 Thread Adrian Klaver
On 11/20/2014 10:06 AM, Marcos Cano wrote: might be awkard but there is no file, so i assume 2 things: 1) there was no upgrade errors So to be clear the file below does not exist?: 2$backup_path/$db_upgrade_errors.txt or it exists but there is nothing in it? 2) the script + command is

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

2014-11-20 Thread Adrian Klaver
On 11/20/2014 10:06 AM, Marcos Cano wrote: might be awkard but there is no file, so i assume 2 things: 1) there was no upgrade errors 2) the script + command is not writing to stderr (i think it is doing it) Aah, meant to add: Is there anything in the Postgres log for the time period of the

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

2014-11-20 Thread Marcos Cano
i did it again... and the file shows exactly the same lots of : invalid command \N invalid command \N invalid command \N invalid command \N invalid command \N invalid command \N invalid command \N invalid command \N -- View this message in context:

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

2014-11-20 Thread Marcos Cano
to answer to Adrian 1) i am using the old version to dump (i will try with the latest) 2) no the postgis version is different. pg9.2.4- postgis-2.0.3 and pg9.3.5- postgis-2.1.3 3) the schema is public \d+ al_shared_place Table

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

2014-11-20 Thread Bill Moran
On Thu, 20 Nov 2014 11:25:10 -0700 (MST) Marcos Cano mc...@stsa.info wrote: i did it again... and the file shows exactly the same lots of : invalid command \N invalid command \N invalid command \N invalid command \N invalid command \N invalid command \N invalid command \N invalid

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

2014-11-20 Thread Marcos Cano
i found this in the file... ERROR: could not access file $libdir/rtpostgis-2.0: No such file or directory which acording to the firs link I found http://gis.stackexchange.com/questions/75520/missing-libraries-when-upgrading-to-postgis-2-1-and-postgresql-9-3-1-using-homeb , is a postgis

Re: [GENERAL] Transactions to create pg_multixact members and offsets

2014-11-20 Thread Dev Kumkar
On Thu, Nov 20, 2014 at 11:15 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Search for burnmulti in the archives, which is a contrib module to test pg_multixact. Thanks, got some links. Will give a try and get back. Merely waiting does not, but more than one lock being acquired on a

Re: [GENERAL] better architecture?

2014-11-20 Thread zach cruise
On 11/20/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/20/2014 08:00 AM, zach cruise wrote: combining replies for the list: On 11/19/14, Charles Zaffery charl...@focusschoolsoftware.com wrote: 2 and 3 can be covered by this: http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster

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

2014-11-20 Thread Adrian Klaver
On 11/20/2014 10:52 AM, Marcos Cano wrote: i found this in the file... What file? Remember the list need context for your statements. You are at the computer and see all that goes on. We only know what you tell us and statements without supporting data are hard to troubleshoot. ERROR:

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

2014-11-20 Thread Marcos Cano
yes i'd better look at the postgis list.. i thought for one moment that this was encoding related. thanks for your help -- View this message in context: http://postgresql.nabble.com/pgdump-9-2-4-not-dumping-all-tables-tp5827736p5827760.html Sent from the PostgreSQL - general mailing list

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

2014-11-20 Thread Bill Moran
On Thu, 20 Nov 2014 11:52:23 -0700 (MST) Marcos Cano mc...@stsa.info wrote: i found this in the file... ERROR: could not access file $libdir/rtpostgis-2.0: No such file or directory which acording to the firs link I found

Re: [GENERAL] better architecture?

2014-11-20 Thread Adrian Klaver
On 11/20/2014 11:02 AM, zach cruise wrote: On 11/20/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/20/2014 08:00 AM, zach cruise wrote: combining replies for the list: Well it would depend on your setup and the load on the master. Assuming streaming replication. Simple

Re: [GENERAL] Transactions to create pg_multixact members and offsets

2014-11-20 Thread Alvaro Herrera
Dev Kumkar wrote: On Thu, Nov 20, 2014 at 11:15 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Merely waiting does not, but more than one lock being acquired on a tuple does cause a multixact to be created. Try SELECT FOR SHARE on two transactions on the same tuple. Sure. Also

Re: [GENERAL] better architecture?

2014-11-20 Thread zach cruise
On 11/20/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/20/2014 11:02 AM, zach cruise wrote: On 11/20/14, Adrian Klaver adrian.kla...@aklaver.com wrote: On 11/20/2014 08:00 AM, zach cruise wrote: combining replies for the list: Well it would depend on your setup and the load on

Re: [GENERAL] better architecture?

2014-11-20 Thread Adrian Klaver
On 11/20/2014 12:30 PM, zach cruise wrote: For more info see: http://www.postgresql.org/docs/9.3/interactive/continuous-archiving.html to be clear- i change my 2 VMs setup {1. master (dev) - 2. slave (prod) setup} to 3 VMs {1. master (dev) - 2. slave (prod) setup - 3. archive (wal)}. but

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

2014-11-20 Thread Jonathan Vanasco
I have a core table with tens-of-millions of rows, and need to delete about a million records. There are 21 foreign key checks against this table. Based on the current performance, it would take a few days to make my deletions. None of the constraints were defined as `DEFERRABLE INITIALLY

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

2014-11-20 Thread Melvin Davidson
Try the following queries. It will give you two .sql files (create_fkeys.sql drop_fkeys.sql). First review them to make sure they look ok. Then execute the drop_fkeys.sql ie: \i drop_fkeys.sql Do your deletes, then rebuild your fk's with \i create_fkeys.sql Good luck.

Re: [GENERAL] better architecture?

2014-11-20 Thread zach cruise
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: http://www.postgresql.org/docs/9.3/interactive/continuous-archiving.html to be clear- i change my 2 VMs setup {1. master (dev) - 2. slave (prod) setup} to 3 VMs {1.

Re: [GENERAL] better architecture?

2014-11-20 Thread Adrian Klaver
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: http://www.postgresql.org/docs/9.3/interactive/continuous-archiving.html to be clear- i change my 2 VMs setup {1. master (dev)

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

2014-11-20 Thread Marcos Cano
so i fix it and got it working !!! i followed the best practices of doing the dump with the newest pg_dump version. and now is working thanks everyone for your help -- View this message in context: http://postgresql.nabble.com/pgdump-9-2-4-not-dumping-all-tables-tp5827736p5827821.html Sent