Re: about truncate

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Fetter <david(at)fetter(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Subject: Re: about truncate
Date: 2009-01-21 14:29:07
Message-ID: 49773133.8090507@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martin Pihlak 2009-01-21 14:42:59 Re: FWD: Re: Updated backslash consistency patch
Previous Message Greg Stark 2009-01-21 14:28:17 Re: rmgr hooks (v2)