Re: Lockless exit path for ReplicationOriginExitCleanup
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-11-22T08:57:58Z
Lists: pgsql-hackers
On Wed, Nov 22, 2023 at 2:12 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > While looking at the use of session_replication_state, I noticed that > ReplicationOriginLock is acquired in ReplicationOriginExitCleanup() > even if session_replication_state is reset to NULL by > replorigin_session_reset(). Why can't there be a lockless exit path > something like [1] similar to > replorigin_session_reset() which checks session_replication_state == > NULL without a lock? > I don't see any problem with such a check but not sure of the benefit of doing so either. -- With Regards, Amit Kapila.
Commits
-
Avoid useless ReplicationOriginExitCleanup locking
- aa817c749657 17.0 landed