Re: Avoid unnecessary ReplicationSlotControl lwlock acquistion

2020-08-24 Thread Masahiko Sawada
On Tue, 25 Aug 2020 at 13:13, Andres Freund wrote: > > Hi, > > On 2020-08-25 12:00:47 +0900, Masahiko Sawada wrote: > > On Tue, 25 Aug 2020 at 11:42, Andres Freund wrote: > > > > > > Hi, > > > > > > On August 24, 2020 7:38:39 PM PDT, Masahiko Sawada > > > wrote: > > > >Hi all, > > > > > > > >Wh

Re: Avoid unnecessary ReplicationSlotControl lwlock acquistion

2020-08-24 Thread Andres Freund
Hi, On 2020-08-25 12:00:47 +0900, Masahiko Sawada wrote: > On Tue, 25 Aug 2020 at 11:42, Andres Freund wrote: > > > > Hi, > > > > On August 24, 2020 7:38:39 PM PDT, Masahiko Sawada > > wrote: > > >Hi all, > > > > > >While testing with DTrace, I realized we acquire > > >ReplicationSlotControl lw

Re: Avoid unnecessary ReplicationSlotControl lwlock acquistion

2020-08-24 Thread Masahiko Sawada
On Tue, 25 Aug 2020 at 11:42, Andres Freund wrote: > > Hi, > > On August 24, 2020 7:38:39 PM PDT, Masahiko Sawada > 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 instan

Re: Avoid unnecessary ReplicationSlotControl lwlock acquistion

2020-08-24 Thread Andres Freund
Hi, On August 24, 2020 7:38:39 PM PDT, Masahiko Sawada 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 er

Avoid unnecessary ReplicationSlotControl lwlock acquistion

2020-08-24 Thread Masahiko Sawada
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 pat