Re: ALTER TABLE ... REPLACE WITH

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: ALTER TABLE ... REPLACE WITH
Дата
Msg-id AANLkTimCozc0GQcuCS79GvPmZeTE6VQwOC3ahndz5tpe@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ALTER TABLE ... REPLACE WITH  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: ALTER TABLE ... REPLACE WITH  (Csaba Nagy <ncslists@googlemail.com>)
Список pgsql-hackers
On Tue, Dec 14, 2010 at 2:34 PM, Josh Berkus <josh@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: ALTER TABLE ... REPLACE WITH
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: pg_execute_from_file, patch v10