pgsql: Avoid useless ReplicationOriginExitCleanup locking

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid useless ReplicationOriginExitCleanup locking
Date: 2024-01-15 12:03:03
Message-ID: E1rPLgF-001XXQ-3z@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)rupireddyforpostgres(at)gmail(dot)com>
Discussion: https://postgr.es/m/CALj2ACX+YaeRU5xJqR4C7kLsTO_F7DBRNF8WgeHvJZcKtNuK_A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/aa817c7496575b37fde6ea5e0cd65b26f29ea532

Modified Files
--------------
src/backend/replication/logical/origin.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2024-01-15 15:45:32 pgsql: Fix 'negative bitmapset member' error
Previous Message Michael Paquier 2024-01-15 00:30:25 pgsql: Reduce dependency to money data type in main regression test sui