Tom Lane wrote:>> I've developed the attached patch against HEAD, and no longer see any> funny behavior. Would
appreciateit if you'd test some more, though.>
The patch works for me. With the patch applied, I don't see the
weird errors in the pgbench and other customized tests that I
used to see earlier.
I looked at the patch as well. ISTM that we are now moving chains
in pieces where each piece is terminated by a DEAD tuple. That
implies that the MOVED_OFF chain is actually broken. This
should not be a problem as long as our assumption that all
RECENTLY_DEAD tuples preceding a DEAD tuple must also be DEAD
and its only the way OldtestXmin is calculated that we see
them as RECENTLY_DEAD.
If that assumption is true (and it must be true for us to move
the chain in pieces), doesn't that mean we don't really need to
move the RECENTLY_DEAD tuples preceding a DEAD tuple ? One way
to do so would be to collect the target tuple (the tuple from
where we started following the t_ctid chain) in the free_offsets
if a DEAD or INSERT_IN_PROGRESS tuple is found while following
the t_ctid chain. One-by-one we would collect all the
RECENTLY_DEAD tuples preceding a DEAD tuple in the truncated
pages.
Not that I am suggesting we do this, just wanted to check if
there is a flaw in my thinking. I agree that we should not be
spending too much time on fixing this corner case and the
patch that you have developed is good enough.
Thanks,
Pavan
--
EnterpriseDB http://www.enterprisedb.com