Re: ALTER TABLE ... REPLACE WITH - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ALTER TABLE ... REPLACE WITH
Date
Msg-id AANLkTinTR84DrhjMGqm=ffstiJ=yO7hYj0KZrOfgwFrx@mail.gmail.com
Whole thread Raw
In response to Re: ALTER TABLE ... REPLACE WITH  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ALTER TABLE ... REPLACE WITH  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On Tue, Dec 14, 2010 at 1:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> BEGIN;
> TRUNCATE TABLE;
> ... load new data ...
> COMMIT;

Because then you have to take an AccessExclusiveLock on the target
table, of course.

If we had some kind of TRUNCATE CONCURRENTLY, I think that'd address a
large portion of the use case for the proposed feature.

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


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: ALTER TABLE ... REPLACE WITH
Next
From: "David E. Wheeler"
Date:
Subject: Re: hstores in pl/python