From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, 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-16 03:59:00 |
Message-ID: | 20221016035900.GA1993341@nathanxps13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 13, 2022 at 12:09:54PM -0700, Nathan Bossart wrote:
> On Thu, Oct 13, 2022 at 12:37:39PM +0200, Alvaro Herrera wrote:
>> The main reason is that it seems odd to have startpointTLI in the struct
>> used in some places together with a file-global recvFileTLI which isn't.
>> The way one is passed as argument and the other as part of a struct
>> seemed too distracting. This should reduce the number of moving parts,
>> ISTM.
>
> Makes sense. Do you think the struct should be file-global so that it
> doesn't need to be provided as an argument to most of the static functions
> in this file?
Here's a different take. Instead of creating structs and altering function
signatures, we can just make the wake-up times file-global, and we can skip
the changes related to reducing the number of calls to
GetCurrentTimestamp() for now. This results in a far less invasive patch.
(I still think reducing the number of calls to GetCurrentTimestamp() is
worthwhile, but I'm beginning to agree with Bharath that it should be
handled separately.)
Thoughts?
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v7-0001-Suppress-useless-wakeups-in-walreceiver.patch | text/x-diff | 10.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-10-16 05:25:22 | Re: Use -fvisibility=hidden for shared libraries |
Previous Message | Tom Lane | 2022-10-16 02:50:07 | Re: Use -fvisibility=hidden for shared libraries |