Re: Suppressing useless wakeups in walreceiver

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Suppressing useless wakeups in walreceiver
Date: 2022-10-11 02:50:31
Message-ID: 20221011025031.GA1322187@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 11, 2022 at 07:01:26AM +0530, Bharath Rupireddy wrote:
> On Mon, Oct 10, 2022 at 11:21 PM Nathan Bossart
>> Outside of the code snippet you pointed out,
>> I think WalReceiverMain() has a similar problem. That being said, I'm
>> generally skeptical that this sort of thing is detrimental given the
>> current behavior (i.e., wake up every 100ms), the usual values of these
>> GUCs (i.e., tens of seconds), and the fact that any tasks that are
>> inappropriately skipped will typically be retried in the next iteration of
>> the loop.
>
> AFICS, the aim of the patch isn't optimizing around
> GetCurrentTimestamp() calls and the patch does seem to change quite a
> bit of them which may cause a change of the behaviour. I think that
> the GetCurrentTimestamp() optimizations can go to 0003 patch in this
> thread itself or we can discuss it as a separate thread to seek more
> thoughts.
>
> The 'now' in many instances in the patch may not actually represent
> the true current time and it includes time taken by other operations
> as well. I think this will have problems.

What problems do you think this will cause?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-10-11 02:52:03 Re: Adding Support for Copy callback functionality on COPY TO api
Previous Message Michael Paquier 2022-10-11 02:31:01 Re: Adding Support for Copy callback functionality on COPY TO api