Why does execReplication.c lock tuples? - Mailing list pgsql-hackers

From Andres Freund
Subject Why does execReplication.c lock tuples?
Date
Msg-id 20190120200302.x477vxi3riinyhmz@alap3.anarazel.de
Whole thread Raw
Responses Re: Why does execReplication.c lock tuples?  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
List pgsql-hackers
Hi,

Currently RelationFindReplTupleByIndex(), RelationFindReplTupleSeq()
lock the found tuple. I don't quite get what that achieves - why isn't
dealing with concurrency in the table_update/delete calls at the
callsites sufficient? As far as I can tell there's no meaningful
concurrency handling in the heap_lock_tuple() paths, so it's not like we
follow update chains or anything. As far as I can tell this just nearly
doubles the number of WAL records when replaying updates/deletes?

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: A small note on the portability of cmake
Next
From: Tom Lane
Date:
Subject: Re: Thread-unsafe coding in ecpg