Re: drop view and recreate - for sync

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: drop view and recreate - for sync
Дата
Msg-id 2968dfd60910231106w5ac93474h9aa4454bc1e3d95c@mail.gmail.com
обсуждение исходный текст
Ответ на drop view and recreate - for sync  (Sydney Puente <sydneypuente@yahoo.com>)
Список pgsql-general
On Fri, Oct 23, 2009 at 2:45 AM, Sydney Puente <sydneypuente@yahoo.com> wrote:

> This data will be accessed a couple of times a second, and I have a cunning
> plan to have a view that points to the initial dataload, and then load up
> the new data into a shadow table, drop the view and then recreate it
> pointing to the shadow table ( which will then no longer be the shadow).

If it is only 100k rows, then within a transaction: 1) delete all
rows, 2) insert all new rows, 3) commit, 4) vacuum.

don't try to compact the table with cluster or vacuum full since
you'll just re-expand it on the next synchronization.

There should be no blocking of your read access.  This assumes your
copy is read-only, which you imply.

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

Предыдущее
От: Joshua Berry
Дата:
Сообщение: Re: Error when trying to use pg_dump on 8.3 after minor release update
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Data migration tool certification