Re: about truncate - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: about truncate
Date
Msg-id 49773133.8090507@gmx.net
Whole thread Raw
In response to Re: about truncate  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan wrote:
>> The pg_dump output was never backward compatible.  (The input is.)  So 
>> the output of parallel restore need not be backward compatible either. 
>> (Unless this mandate has changed dramatically while I was not 
>> looking?)  So always issue TRUNCATE ONLY, if that is what the logic 
>> requires. The additional benefit is that this will fail safely on 
>> older versions.

> No it won't fail safely on older versions, because the truncate is part 
> of a transaction, and thus the data member(s) will all fail.

I meant "safe" as in, it won't randomly delete more data than you 
intended.  I didn't mean in as in do-what-I-mean. :-)

> I'd like to 
> be able to use 8.4 pg_restore to run parallel restores on older servers, 
> and the fix for this is utterly trivial. I'll be posting a new patch 
> with it in today.

Works for me.


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: rmgr hooks (v2)
Next
From: Teodor Sigaev
Date:
Subject: Re: [PATCHES] GIN improvements