Re: about truncate

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(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 13:00:05
Message-ID: 49771C55.8040102@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> Andrew Dunstan wrote:
>> It's just occurred to me that if TRUNCATE no longer means TRUNCATE ONLY,
>> parallel restore will need to detect which server version is being
>> used so that for version > 8.3 it issues TRUNCATE ONLY.
>
> 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'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.

(If we can't or don't want to make it work with older servers, I will
create an out-of-tree patch for 8.3 that does, and put it on pgFoundry.
But that would be a pity.)

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-01-21 13:15:51 Pluggable Indexes (was Re: rmgr hooks (v2))
Previous Message Peter Eisentraut 2009-01-21 12:54:54 Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.