Re: COMMIT NOWAIT Performance Option

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Jeff Davis" <pgsql(at)j-davis(dot)com>
Cc: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Josh Berkus" <josh(at)agliodbs(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Subject: Re: COMMIT NOWAIT Performance Option
Date: 2007-03-01 00:07:54
Message-ID: 87zm6xu8px.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jeff Davis" <pgsql(at)j-davis(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2007-03-01 00:26:30 Re: [HACKERS]
Previous Message Josh Berkus 2007-03-01 00:06:47 Re: COMMIT NOWAIT Performance Option