Skip site navigation (1) Skip section navigation (2)

Re: NOLOGGING option, or ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Jochem van Dieten <jochemd(at)gmail(dot)com>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: NOLOGGING option, or ?
Date: 2005-06-01 15:43:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-06-01 15:55:46
Subject: Re: NOLOGGING option, or ?
Previous:From: Tom LaneDate: 2005-06-01 15:31:31
Subject: Re: NOLOGGING option, or ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group