From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: suppressing useless wakeups in logical/worker.c
Date: Thu, 26 Jan 2023 17:37:05 -0500
Message-ID: <3220831.1674772625@sss.pgh.pa.us> (raw)
In-Reply-To: <20230126212255.GA1746118@nathanxps13>
References: <CA+hUKGJ=oFEX=TjeSCnGmqr_KseGLJxy=RnJMwRqPrX7N-Q2sg@mail.gmail.com>
<20230126003319.GA1507251@nathanxps13>
<2878152.1674700077@sss.pgh.pa.us>
<CA+hUKGLpH=y4=Zx+=oLE8WvLqLHWNC-PEDARrrt=x=J_REL9Fg@mail.gmail.com>
<2888102.1674705840@sss.pgh.pa.us>
<3126727.1674759248@sss.pgh.pa.us>
<20230126194812.GA1702315@nathanxps13>
<3165443.1674763470@sss.pgh.pa.us>
<20230126202301.GA1703463@nathanxps13>
<3211341.1674767391@sss.pgh.pa.us>
<20230126212255.GA1746118@nathanxps13>
Nathan Bossart <nathandbossart@gmail.com> writes:
> On Thu, Jan 26, 2023 at 04:09:51PM -0500, Tom Lane wrote:
>> Right, so more like this.
> LGTM
Thanks, pushed.
Returning to the prior patch ... I don't much care for this:
+ /* Maybe there will be a free slot in a second... */
+ retry_time = TimestampTzPlusSeconds(now, 1);
+ LogRepWorkerUpdateSyncStartWakeup(retry_time);
We're not moving the goalposts very far on unnecessary wakeups if
we have to do that. Do we need to get a wakeup on sync slot free?
Although having to send that to every worker seems ugly. Maybe this
is being done in the wrong place and we need to find a way to get
the launcher to handle it.
As for the business about process_syncing_tables being only called
conditionally, I was already of the opinion that the way it's
getting called is loony. Why isn't it called from LogicalRepApplyLoop
(and noplace else)? With more certainty about when it runs, we might
not need so many kluges elsewhere.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, thomas.munro@gmail.com, kuroda.hayato@fujitsu.com
Subject: Re: suppressing useless wakeups in logical/worker.c
In-Reply-To: <3220831.1674772625@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox