On Tue, Dec 14, 2010 at 2:34 PM, Josh Berkus <j...@agliodbs.com> wrote: > On 12/14/10 11:07 AM, Robert Haas wrote: >> Because then you have to take an AccessExclusiveLock on the target >> table, of course. > > Well, you have to do that for DROP TABLE as well, and I don't see any > way around doing it for REPLACE WITH.
Sure, but in Simon's proposal you can load the data FIRST and then take a lock just long enough to do the swap. That's very different from needing to hold the lock during the whole data load. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers