Re: [HACKERS] pg_dump and pg_dumpall in real life (proposal)

2013-11-12 Thread Rafael Martinez Guerrero
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/12/2013 03:28 PM, Stephen Frost wrote: > * Rafael Martinez (r.m.guerr...@usit.uio.no) wrote: >> Comments? > > Create a wiki page for it. :) > What about this to start with?: https://wiki.postgresql.org/wiki/Pg_dump_improvements - -- Rafael M

Re: [HACKERS] pg_dump and pg_dumpall in real life (proposal)

2013-11-12 Thread Stephen Frost
* Rafael Martinez (r.m.guerr...@usit.uio.no) wrote: > Comments? Create a wiki page for it. :) Thanks, Stephen signature.asc Description: Digital signature

Re: [HACKERS] pg_dump and pg_dumpall in real life (proposal)

2013-11-12 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/11/2013 11:20 PM, Josh Berkus wrote: > On 11/11/2013 06:24 AM, Stephen Frost wrote: >> * Rafael Martinez (r.m.guerr...@usit.uio.no) wrote: >>> * We need a pg_dump solution that can generate in one step all >>> the necessary pieces of information

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Craig Ringer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/11/2013 09:59 PM, Rafael Martinez wrote: > * We need a pg_dump solution that can generate in one step all the > necessary pieces of information needed when restoring or cloning a > database. (schema, data, privileges, users and alter database/r

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Fabrízio de Royes Mello
On Mon, Nov 11, 2013 at 8:20 PM, Josh Berkus wrote: > > > [...] > > Well, then we just need pg_restore to handle the "role already exists" > error message gracefully. That's all. Or a "CREATE ROLE IF NOT EXISTS" > statement, and use that for roles. > I'm working in a patch to add IF NOT EXISTS

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Andrew Dunstan
On 11/11/2013 05:50 PM, David Johnston wrote: Andrew Dunstan wrote A general ability to rename things would be good. In particular, restoring schema x into schema y or table x into table y would be very useful, especially if you need to be able to compare old with new. compare old and new what

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Josh Berkus
On 11/11/2013 03:06 PM, David Johnston wrote: > Josh Berkus wrote >> Well, then we just need pg_restore to handle the "role already exists" >> error message gracefully. That's all. Or a "CREATE ROLE IF NOT EXISTS" >> statement, and use that for roles. > > My only qualm here is if the exists chec

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread David Johnston
Josh Berkus wrote > Well, then we just need pg_restore to handle the "role already exists" > error message gracefully. That's all. Or a "CREATE ROLE IF NOT EXISTS" > statement, and use that for roles. My only qualm here is if the exists check is based off of role name only. If database "A" and

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread David Johnston
Andrew Dunstan wrote > A general ability to rename things would be good. In particular, > restoring schema x into schema y or table x into table y would be very > useful, especially if you need to be able to compare old with new. compare old and new what? I would imagine that schema comparisons

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Josh Berkus
On 11/11/2013 06:24 AM, Stephen Frost wrote: > * Rafael Martinez (r.m.guerr...@usit.uio.no) wrote: >> * We need a pg_dump solution that can generate in one step all the >> necessary pieces of information needed when restoring or cloning a >> database. (schema, data, privileges, users and alter data

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Andrew Dunstan
On 11/11/2013 08:59 AM, Rafael Martinez wrote: * It would be great to be able to tell pg_restore that user1 in the dump will became user2 in the restored/cloned database. The same for the name of the database. A general ability to rename things would be good. In particular, restoring schema

Re: [HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Stephen Frost
* Rafael Martinez (r.m.guerr...@usit.uio.no) wrote: > * We need a pg_dump solution that can generate in one step all the > necessary pieces of information needed when restoring or cloning a > database. (schema, data, privileges, users and alter database/role data) This sounds pretty reasonable and

[HACKERS] pg_dump and pg_dumpall in real life

2013-11-11 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello After some discussions in #pgconfeu, this is an attempt to relaunch the discussion about how pg_dump and pg_dumpall work and the challenges they give us in real life. We have got bitten sometimes because of their behavior and we can see it is a