Re: WAL Log Size

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: WAL Log Size
Дата
Msg-id Pine.GSO.4.64.0802290200230.2395@westnet.com
обсуждение исходный текст
Ответ на Re: WAL Log Size  (Sam Mason <sam@samason.me.uk>)
Ответы Re: WAL Log Size
Список pgsql-general
On Fri, 29 Feb 2008, Sam Mason wrote:

> Just out of interest, why doesn't it do the following?
>
>  BEGIN;
>  create table xlog_switch as
>    select '0123456789ABCDE' from generate_series(1,1000000);
>  ROLLBACK;

I'm not 100% sure here what happens when you do the above, and it depends
on version, but there are cases where creating a new or empty table in a
transaction is optimized to not create any WAL as a performance
improvement.  This has become a common idiom for that reason:

BEGIN;
truncate table t;
copy t from '/fdsa/fds/afds.csv' with csv;
COMMIT;

To take advantage of this loading without WAL feature.

I wish I had more details here, never have found a more formal definition
of how this works than suggestions on the list.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

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

Предыдущее
От: Klint Gore
Дата:
Сообщение: Re: rule question
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: WAL Log Size