Re: Unloading a table consistently

Поиск
Список
Период
Сортировка
От Christophe
Тема Re: Unloading a table consistently
Дата
Msg-id 7E808813-4401-4A0B-9857-986918BF5875@thebuild.com
обсуждение исходный текст
Ответ на Re: Unloading a table consistently  (ptjm@news-reader-radius.uniserve.com (Patrick TJ McPhee))
Список pgsql-general
On May 3, 2008, at 9:29 PM, Patrick TJ McPhee wrote:
> How about something along the lines of
>
> BEGIN;
> ALTER TABLE log RENAME to log_old;
> CREATE TABLE log(...);
> COMMIT;
>
> BEGIN;
> LOCK table log_old;
> COPY log_old TO 'filename-path';
> DROP TABLE log_old;
> COMMIT;
>
> I believe this will keep the writers writing while keeping the
> efficiency
> of truncating.

Brilliant.

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

Предыдущее
От: "Dan \"Heron\" Myers"
Дата:
Сообщение: Re: Custom C function - is palloc broken?
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Custom C function - is palloc broken?