Re: Suggestion for --truncate-tables to pg_restore - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Suggestion for --truncate-tables to pg_restore
Date
Msg-id CA+TgmoY7MZatD7qiR97hQDOz-Pxg+vaKmrKXdm36=RS=mtH58A@mail.gmail.com
Whole thread Raw
In response to Re: Suggestion for --truncate-tables to pg_restore  (Josh Kupershmidt <schmiddy@gmail.com>)
Responses Re: Suggestion for --truncate-tables to pg_restore
List pgsql-hackers
On Wed, Nov 21, 2012 at 12:53 AM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
> TBH, I didn't find the example above particularly compelling for
> demonstrating the need for this feature. If you've just got one table
> with dependent views which needs to be restored, it's pretty easy to
> manually TRUNCATE and have pg_restore --data-only reload the table.
> (And easy enough to combine the truncate and restore into a single
> transaction in case anything goes wrong, if need be.)
>
> But I'm willing to grant that this proposed feature is potentially as
> useful as existing restore-jiggering options like --disable-triggers.
> And I guess I could see that if you're really stuck having to perform
> a --data-only restore of many tables, this feature could come in
> handy.

I think I would come down on the other side of this.  We've never
really been able to get --clean work properly in all scenarios, and it
seems likely that a similar fate will befall this option.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: WIP json generation enhancements
Next
From: Bruce Momjian
Date:
Subject: Re: [WIP] pg_ping utility