Re: Buffer Management: Can dirty pages be written before transaction commits?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Prima Chairunnanda <prima(dot)ch(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Buffer Management: Can dirty pages be written before transaction commits?
Date: 2012-06-07 13:50:04
Message-ID: 8092.1339077004@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Prima Chairunnanda <prima(dot)ch(at)gmail(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message James David Smith 2012-06-07 13:52:15 Installing PostGIS 2.0
Previous Message Devrim GÜNDÜZ 2012-06-07 00:40:42 Re: pg_upgrade missing