Re: Bugs in b-tree dead page removal - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bugs in b-tree dead page removal
Date
Msg-id 24409.1265597939@sss.pgh.pa.us
Whole thread Raw
In response to Bugs in b-tree dead page removal  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> And there's another problem: _bt_pagedel is designed to recurse
> in certain improbable cases, but I think this is flat out wrong
> when doing WAL replay --- if the original process did recurse
> then it will have emitted a WAL record for each deleted page,
> meaning replay would try to delete twice.

No, scratch that, I misread it: _bt_pagedel isn't invoked during
WAL replay, but for cleanup of incomplete deletions at termination
of WAL replay.  So any recursing it has to do also corresponds to
actions that weren't in WAL.  So that's OK.

I'm still concerned about the interlock against read-only
transactions though.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Bugs in b-tree dead page removal
Next
From: Alvaro Herrera
Date:
Subject: Re: Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)