Andres Freund <and...@2ndquadrant.com> writes:
> On 2014-03-17 14:01:03 -0400, Tom Lane wrote:
>> IIUC, this case only occurs when using the new-in-9.3 types of
>> nonexclusive row locks.  I'm willing to bet that the number of
>> applications using those is negligible; so I think it's all right to not
>> mention that case explicitly, as long as the wording doesn't say that
>> foreign keys are the *only* cause (which I didn't).

> I actually think the issue could also occur with row locks of other
> severities (is that the correct term?).

The commit log entry says
    
    We were resetting the tuple's HEAP_HOT_UPDATED flag as well as t_ctid on
    WAL replay of a tuple-lock operation, which is incorrect when the tuple
    is already updated.
    
    Back-patch to 9.3.  The clearing of both header elements was there
    previously, but since no update could be present on a tuple that was
    being locked, it was harmless.

which I read to mean that the case can't occur with the types of row
locks that were allowed pre-9.3.

> but if I see correctly it's also triggerable if a backend waits for an
> updating transaction to finish and follow_updates = true is passed to
> heap_lock_tuple(). Which e.g. nodeLockRows.c does...

That sounds backwards.  nodeLockRows locks the latest tuple in the chain,
so it can't be subject to this.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to