Re: Suppressing useless wakeups in walreceiver - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Suppressing useless wakeups in walreceiver
Date
Msg-id 20221114000531.GA1357901@nathanxps13
Whole thread Raw
In response to Re: Suppressing useless wakeups in walreceiver  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Suppressing useless wakeups in walreceiver
List pgsql-hackers
On Mon, Nov 14, 2022 at 12:51:14PM +1300, Thomas Munro wrote:
> On Mon, Nov 14, 2022 at 12:35 PM Thomas Munro <thomas.munro@gmail.com> wrote:
>> Maybe there is a better way to code this (I mean, who likes global
>> variables?) and I need to test some more, but I suspect the attached
>> is approximately what we missed.
> 
> Erm, ENOCOFFEE, sorry that's not quite right, it needs the apply LSN,
> but it demonstrates what the problem is...

Yeah, I'm able to sort-of reproduce the problem by sending fewer replies,
but it's not clear to me why that's the problem.  AFAICT all of the code
paths that write/flush are careful to send a reply shortly afterward, which
should keep writePtr/flushPtr updated.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: CI and test improvements
Next
From: "Takamichi Osumi (Fujitsu)"
Date:
Subject: RE: logical replication restrictions