Re: Remove xmin and cmin from frozen tuples

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove xmin and cmin from frozen tuples
Дата
Msg-id 17454.1125691328@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Remove xmin and cmin from frozen tuples  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Remove xmin and cmin from frozen tuples  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> THe only fundamental disadvantage that COPY labors under is having to
>> write WAL records.  It might be interesting to do something similar to
>> the recent hacks for CREATE TABLE AS, so that a COPY into a table just
>> created in the current transaction would skip writing WAL and instead
>> fsync the table at the end.

> Added to TODO:
>         o Allow COPY into an empty table to skip WAL logging

It has to be a *new* table, not an *empty* table.  If it's already
visible to other xacts then somebody else could insert into it in
parallel with you, because COPY doesn't take an exclusive lock.
Contrariwise, it doesn't really matter (I think) if there are WAL-logged
records already in the table and COPY is adding more that aren't logged.
(You might have to force COPY to start adding the rows on freshly added
pages ... hmm ... all of a sudden I think we had this discussion already?
I for sure remember the fresh-pages trick from some other thread.)
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Procedural language definitions (was Re: 8.1 and syntax checking at create time)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Remove xmin and cmin from frozen tuples