Re: NOLOGGING option, or ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: NOLOGGING option, or ?
Date
Msg-id 14461.1117640604@sss.pgh.pa.us
Whole thread Raw
In response to Re: NOLOGGING option, or ?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Jochem van Dieten wrote:
>> Why only on an empty table? What is the problem with bypassing WAL on
>> any table as long as all files of that table are fsync'ed before
>> commit?

> Because adding rows to a table might modify existing pages, and if the
> COPY fails, you have to restore those pages to a consistent state, and
> make sure they are recovered for partial page writes, which we can't do
> without WAL.  With an initially empty table, you can just throw away the
> file system file.

You have also got to think about the effects on the table's indexes ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: NOLOGGING option, or ?
Next
From: Tom Lane
Date:
Subject: Re: NOLOGGING option, or ?