Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2015-12-15 Thread rsindlin
Hi Joe, I have run into what seems to be a similar issue with pg_dump --schema-only in its trigger ordering. Did you ever find a satisfactory solution to this? I posted my specific problem on DBA.StackExchange

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-31 Thread Joe Abbate
On 08/31/2011 10:17 AM, Tom Lane wrote: Short of that sort of anal-retentiveness, there are going to be cases where the dump order is a bit unpredictable. IMO what we need is a reasonable compromise between verbosity and uniqueness, such that in normal cases (ie, where you *didn't* intentionally

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-31 Thread Tom Lane
Peter Eisentraut writes: > On tis, 2011-08-30 at 18:07 -0400, Tom Lane wrote: >> Yeah, we've been around on that before. pg_dump does actually sort the >> output items (modulo dependency requirements), but it sorts by the same >> "tag" values that are printed by pg_restore -l, and those aren't cu

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-31 Thread Peter Eisentraut
On tis, 2011-08-30 at 18:07 -0400, Tom Lane wrote: > Joe Abbate writes: > > In order to compare the schema of two presumably identical databases, > > I've been diffing the output of pg_dump -Osx. However, I've found that > > the order of the output is not very reliable. > > Yeah, we've been ar

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-31 Thread Peter Eisentraut
On tis, 2011-08-30 at 19:11 -0400, Stephen Frost wrote: > * Joe Abbate (j...@freedomcircle.com) wrote: > > In order to compare the schema of two presumably identical > > databases, I've been diffing the output of pg_dump -Osx. > > I'm not sure exactly how it does it, but check_postgres.pl offers

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Note that what I'm looking for is something to compare just about > EVERYTHING DDL under the PostgreSQL sun: tables, types, functions, > operators, etc. The description of same_schema appears to imply only a > subset of objects are compared

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Joe Abbate
Hi Stephen, On 08/30/2011 07:11 PM, Stephen Frost wrote: * Joe Abbate (j...@freedomcircle.com) wrote: In order to compare the schema of two presumably identical databases, I've been diffing the output of pg_dump -Osx. I'm not sure exactly how it does it, but check_postgres.pl offers this. ht

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Stephen Frost
* Joe Abbate (j...@freedomcircle.com) wrote: > In order to compare the schema of two presumably identical > databases, I've been diffing the output of pg_dump -Osx. I'm not sure exactly how it does it, but check_postgres.pl offers this. http://bucardo.org/wiki/Check_postgres It also offers a w

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Joe Abbate
On 08/30/2011 06:07 PM, Tom Lane wrote: Yeah, we've been around on that before. pg_dump does actually sort the output items (modulo dependency requirements), but it sorts by the same "tag" values that are printed by pg_restore -l, and those aren't currently designed to be unique. It's not too c

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Tom Lane
Joe Abbate writes: > In order to compare the schema of two presumably identical databases, > I've been diffing the output of pg_dump -Osx. However, I've found that > the order of the output is not very reliable. Yeah, we've been around on that before. pg_dump does actually sort the output ite

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Joe Abbate
On 08/30/2011 05:33 PM, Jaime Casanova wrote: On Tue, Aug 30, 2011 at 3:14 PM, Joe Abbate wrote: Hola Jaime, On 08/30/2011 03:24 PM, Jaime Casanova wrote: what about using pg_dump -Fc -Osx and use pg_restore -l to list objects. then you can sort and compare objects and then a script that com

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Jaime Casanova
On Tue, Aug 30, 2011 at 3:14 PM, Joe Abbate wrote: > Hola Jaime, > > On 08/30/2011 03:24 PM, Jaime Casanova wrote: >> >> what about using pg_dump -Fc -Osx and use pg_restore -l to list >> objects. then you can sort and compare objects and then a script that >> compare schema of objects extracting

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Joe Abbate
Hola Jaime, On 08/30/2011 03:24 PM, Jaime Casanova wrote: what about using pg_dump -Fc -Osx and use pg_restore -l to list objects. then you can sort and compare objects and then a script that compare schema of objects extracting them with -P, -T or -t That appears to be of limited use (i.e., i

Re: [HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Jaime Casanova
On Tue, Aug 30, 2011 at 2:07 PM, Joe Abbate wrote: > Hi, > > In order to compare the schema of two presumably identical databases, I've > been diffing the output of pg_dump -Osx.  However, I've found that the order > of the output is not very reliable. what about using pg_dump -Fc -Osx and use pg

[HACKERS] Comparing two PostgreSQL databases -- order of pg_dump output

2011-08-30 Thread Joe Abbate
Hi, In order to compare the schema of two presumably identical databases, I've been diffing the output of pg_dump -Osx. However, I've found that the order of the output is not very reliable. For example, after recreating the Pagila sample database, I find the following: --- pagila.dmp 201