Avoid useless ReplicationOriginExitCleanup locking

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: aa817c7496575b37fde6ea5e0cd65b26f29ea532
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2024-01-15T12:02:03Z
Releases: 17.0
Avoid useless ReplicationOriginExitCleanup locking

When session_replication_state is NULL, we can know there's nothing to
do with no lock acquisition.  Do that.

Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Discussion: https://postgr.es/m/CALj2ACX+YaeRU5xJqR4C7kLsTO_F7DBRNF8WgeHvJZcKtNuK_A@mail.gmail.com

Files

PathChange+/−
src/backend/replication/logical/origin.c modified +8 −5

Discussion