On 2014-02-27 09:41:03 -0500, Tom Lane wrote:
> Alvaro Herrera <[email protected]> writes:
> > Fix WAL replay of locking an updated tuple
> 
> The test added by this patch certainly looks like it's backwards.
> Shouldn't you be clearing HOT_UPDATED only if the tuple is *not*
> XMAX_IS_LOCKED_ONLY?

If it's not XMAX_IS_LOCKED_ONLY, we're locking the last tuple in the
ctid chain, so there is no need for t_ctid to point anywhere. If it's
not, there are later tuples (which the locking backend can't see yet
because of its snapshot) but which haven't changed the key and thus only
have NO KEY UPDATE lock level.

The bug exactly was that the ctid chain was destroyed when there were
later tuples.

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to