Re: COMMIT NOWAIT Performance Option - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: COMMIT NOWAIT Performance Option
Date
Msg-id 87zm6xu8px.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: COMMIT NOWAIT Performance Option  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
"Jeff Davis" <pgsql@j-davis.com> writes:

> On Wed, 2007-02-28 at 21:13 +0000, Gregory Stark wrote:
>> Hm that's an interesting thought. We only really have to check pages that
>> would have received a full page write since the last checkpoint. So if we made
>
> Do we ever do a partial page write, or is what you're saying equivalent
> to "we only have to check pages that have been written to since the last
> checkpoint"?

"full page writes" is a term of art in Postgres. When we first modify a page
we stuff a copy of the entire page in the WAL so that recovery can restore it.
We never write only part of a page to data files intentionally but if the
system crashes while it's in the process of being written only part of it
might end up getting written. Normally only the modified bits get put in WAL.

> And if it is the same, can't we get the pages that were written to from
> the ctids in the wal records?

yes, though it may still be convenient to use the full page write fields


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: COMMIT NOWAIT Performance Option
Next
From: "FAST PostgreSQL"
Date:
Subject: Re: [PATCHES]