Re: walsender performance regression due to logical decoding on standby changes - Mailing list pgsql-hackers

From Drouvot, Bertrand
Subject Re: walsender performance regression due to logical decoding on standby changes
Date
Msg-id d211aa1b-eff8-6c76-18c8-6aa5ad5726b0@gmail.com
Whole thread Raw
In response to Re: walsender performance regression due to logical decoding on standby changes  (Andres Freund <andres@anarazel.de>)
Responses Re: walsender performance regression due to logical decoding on standby changes
List pgsql-hackers
Hi,

On 5/9/23 11:00 PM, Andres Freund wrote:
> Hi,
> 
> On 2023-05-09 13:38:24 -0700, Jeff Davis wrote:
>> On Tue, 2023-05-09 at 12:02 -0700, Andres Freund wrote:
>>> I don't think the approach of not having any sort of "registry" of
>>> whether
>>> anybody is waiting for the replay position to be updated is
>>> feasible. Iterating over all walsenders slots is just too expensive -
>>
>> Would it work to use a shared counter for the waiters (or, two
>> counters, one for physical and one for logical), and just early exit if
>> the count is zero?
> 
> That doesn't really fix the problem - once you have a single walsender
> connected, performance is bad again.
> 

Just to clarify, do you mean that if there is only one remaining active walsender that, say,
has been located at slot n, then we’d still have to loop from 0 to n in WalSndWakeup()?

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: walsender performance regression due to logical decoding on standby changes
Next
From: Peter Smith
Date:
Subject: Re: pg_upgrade and logical replication