Re: Buffer Management: Can dirty pages be written before transaction commits? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Buffer Management: Can dirty pages be written before transaction commits?
Date
Msg-id 8092.1339077004@sss.pgh.pa.us
Whole thread Raw
In response to Buffer Management: Can dirty pages be written before transaction commits?  (Prima Chairunnanda <prima.ch@gmail.com>)
Responses Re: Buffer Management: Can dirty pages be written before transaction commits?
List pgsql-novice
Prima Chairunnanda <prima.ch@gmail.com> writes:
> I am really unsure about point 2, because I couldn't find any definite
> statement whether a dirty page could be written before transaction commits.

Certainly.  Were that not so, how would we handle mass update
transactions (where "mass" means "dirties more pages than can fit in
shared_buffers")?

Dirty pages can be written out at any time, subject only to the WAL rule
that the relevant WAL records have to be flushed to disk first.  The
buffer manager checks that by comparing the page's LSN field to the
globally-visible latest WAL flush location.

            regards, tom lane

pgsql-novice by date:

Previous
From: Prima Chairunnanda
Date:
Subject: Buffer Management: Can dirty pages be written before transaction commits?
Next
From: James David Smith
Date:
Subject: Installing PostGIS 2.0