Re: [GENERAL] Disabling and enabling constraints and triggers to make pg_restore work

2006-08-07 Thread Ken Winter
Subject: Re: [GENERAL] Disabling and enabling constraints and triggers to make pg_restore work Ken Winter [EMAIL PROTECTED] writes: I'm trying to do a data-only pg_restore. I'm running into a roadblock whenever the restore tries to populate a table with a foreign key

Re: [GENERAL] Disabling and enabling constraints and triggers to

2006-08-07 Thread Kenneth Downs
Ken Winter wrote: Tom et al ~ I understand that this is all a risky business. So maybe someone can tell me a safer way to accomplish what I was trying to accomplish with pg_dump and data-only pg_restore. It's a basic bit of database administration work. I'm trying to establish two (or if

Re: [GENERAL] Disabling and enabling constraints and triggers to

2006-08-07 Thread Berend Tober
Ken Winter wrote: It's a basic bit of database administration work. I'm trying to establish two (or if necessary more) instances of the same database - a production instance and a development instance - and a change management process for coordinating them. As you can probably guess: You

Re: [GENERAL] Disabling and enabling constraints and triggers to make pg_restore work

2006-08-07 Thread Tom Lane
Ken Winter [EMAIL PROTECTED] writes: ... So, the process I have in mind goes like this: ... 3. At the end of the release cycle, empty all the data from the development instance, shut down the production instance (or at least write-lock up its data), and copy the production data (data only)

[GENERAL] Disabling and enabling constraints and triggers to make pg_restore work

2006-08-06 Thread Ken Winter
I’m trying to do a data-only pg_restore. I’m running into a roadblock whenever the restore tries to populate a table with a foreign key before it has populated the primary key table that it refers to: This violates the FK constraint, which aborts the restore. Given the complexity of the database

Re: [GENERAL] Disabling and enabling constraints and triggers to make pg_restore work

2006-08-06 Thread Tom Lane
Ken Winter [EMAIL PROTECTED] writes: I’m trying to do a data-only pg_restore. I’m running into a roadblock whenever the restore tries to populate a table with a foreign key before it has populated the primary key table that it refers to: This violates the FK constraint, which aborts the