Re: ALTER TABLE ... REPLACE WITH
От | Simon Riggs |
---|---|
Тема | Re: ALTER TABLE ... REPLACE WITH |
Дата | |
Msg-id | 1292373214.2737.5178.camel@ebony обсуждение исходный текст |
Ответ на | ALTER TABLE ... REPLACE WITH (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: ALTER TABLE ... REPLACE WITH
|
Список | pgsql-hackers |
On Tue, 2010-12-14 at 16:19 -0800, Josh Berkus wrote: > Without some means of doing a clone of the table in a single command, > you've eliminated half the scripting work, but not helped at all with > the other half. I'm not trying to eliminate scripting work, I'm trying to minimise the lock window with a reliable and smooth atomic switcheroo. > Actually, you know what would be ideal? > > REPLACE TABLE old_table WITH SELECT ... > > Give it some thought ... I have; the above would hold the lock window open while the SELECT runs and that is explicitly something we are trying to avoid. Good creative input though, thank you. -- Simon Riggs http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services
В списке pgsql-hackers по дате отправления: