Re: Idea for better handling of cntxDirty

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mikheev, Vadim" <VMIKHEEV(at)sectordata(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Idea for better handling of cntxDirty
Date: 2002-11-12 19:49:54
Message-ID: 10841.1037130594@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Mikheev, Vadim" <VMIKHEEV(at)sectordata(dot)com> writes:
>> Wouldn't it work for cntxDirty to be set not by LockBuffer, but by
>> XLogInsert for each buffer that is included in its argument list?

> I thought to add separate call to mark context dirty but above
> should work if all callers to XLogInsert always pass all
> modified buffers - please check.

AFAICT it is safe. There are some places (in sequences and btree)
where not all the modified buffers are explicitly listed in XLogInsert's
arguments, but redo of those types of WAL records will always reinit the
affected pages anyway. So we don't need to worry about forcing
checkpoint to write the pages early.

In general I don't think this adds any fragility to the system. A WAL
record that is not set up to restore all buffers modified by the logged
operation would be broken by definition, no?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jakub Ouhrabka 2002-11-12 20:05:52 Re: ecpg "problem" ...
Previous Message Curtis Faith 2002-11-12 19:41:40 Prepare enabled pgbench