Re: Bug in visibility hint bit - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug in visibility hint bit
Date
Msg-id 14815.1251180466@sss.pgh.pa.us
Whole thread Raw
In response to Bug in visibility hint bit  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> ... But really, I don't think such
> communication should be necessary, and the xlrec.all_visible_cleared
> and xlrec.new_all_visible_cleared fields are unneeded.  Just assume
> they are true.  It seems like the worst thing that can happen is that
> we call PageClearAllVisible when it is already cleared, which is
> hardly harmful (the blocks that have redo applied to them are already
> dirty, so a spurious clear doesn't cause unneeded IO)

Just to respond to that --- I spent awhile yesterday thinking the same
thing.  But the value of those flags is to tell the WAL replay functions
whether they need to go and clear the corresponding bits in the
visibility map.  Making them do that unconditionally for every
insert/update/delete would surely be a pretty big hit to the speed of
WAL replay, which already leaves a lot to be desired :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: 8.5 release timetable, again
Next
From: Jean-Michel Pouré
Date:
Subject: Re: DELETE syntax on JOINS