> 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
"Mikheev, Vadim" <[EMAIL PROTECTED]> 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
Vadim,
In LockBuffer() you wrote
else if (mode == BUFFER_LOCK_EXCLUSIVE)
{
LWLockAcquire(buf->cntx_lock, LW_EXCLUSIVE);
/*
* This is not the best place to set cntxDirty flag (eg indices do
* not always change buffer they lock in excl mode). But please