Re: Suppressing useless wakeups in walreceiver

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, alvherre(at)alvh(dot)no-ip(dot)org, bharath(dot)rupireddyforpostgres(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Suppressing useless wakeups in walreceiver
Date: 2022-11-14 00:05:31
Message-ID: 20221114000531.GA1357901@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)munro(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Takamichi Osumi (Fujitsu) 2022-11-14 01:08:49 RE: logical replication restrictions
Previous Message Justin Pryzby 2022-11-13 23:53:04 Re: CI and test improvements