On Wed, Nov 22, 2023 at 2:12 PM Bharath Rupireddy <bharath.rupireddyforpostg...@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.