Re: Avoid unnecessary ReplicationSlotControl lwlock acquistion - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Avoid unnecessary ReplicationSlotControl lwlock acquistion
Date
Msg-id B31F589E-4A72-417D-B050-A2030BD88D0D@anarazel.de
Whole thread Raw
In response to Avoid unnecessary ReplicationSlotControl lwlock acquistion  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Responses Re: Avoid unnecessary ReplicationSlotControl lwlock acquistion  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
List pgsql-hackers
Hi,

On August 24, 2020 7:38:39 PM PDT, Masahiko Sawada <masahiko.sawada@2ndquadrant.com> wrote:
>Hi all,
>
>While testing with DTrace, I realized we acquire
>ReplicationSlotControl lwlock at some places even when
>max_replication_slots is set to 0. For instance, we call
>ReplicationSlotCleanup() within PostgresMian() when an error happens
>and acquire ReplicationSlotControl lwlock.
>
>The attached patch fixes some functions so that we quickly return if
>max_replication_slots is set to 0.

Why is it worth doing so?

Regards,

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: "cert" + clientcert=verify-ca in pg_hba.conf?
Next
From: Masahiko Sawada
Date:
Subject: Re: Avoid unnecessary ReplicationSlotControl lwlock acquistion