> 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.

Vadim

Tue, 12 Nov 2002 10:11:01 -0800
"Mikheev, Vadim" <VMIKHEEV@sectordata.com>
Re: Idea for better handling of cntxDirty
"Mikheev, Vadim" <VMIKHEEV@sectordata.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

Tue, 12 Nov 2002 14:49:54 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Idea for better handling of cntxDirty 