From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: suppressing useless wakeups in logical/worker.c |
Date: | 2023-03-17 00:22:55 |
Message-ID: | 20230317002255.GA946711@nathanxps13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I've attached a minimally-updated patch that doesn't yet address the bigger
topics under discussion.
On Thu, Mar 16, 2023 at 03:30:37PM +0530, Amit Kapila wrote:
> On Wed, Feb 1, 2023 at 5:35 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> On Sat, Jan 28, 2023 at 10:26:25AM +0530, Amit Kapila wrote:
>> > BTW, do we need to do something about wakeups in
>> > wait_for_relation_state_change()?
>>
>> ... and wait_for_worker_state_change(), and copy_read_data(). From a quick
>> glance, it looks like fixing these would be a more invasive change.
>
> What kind of logic do you have in mind to avoid waking up once per
> second in those cases?
I haven't looked into this too much yet. I'd probably try out Tom's
suggestions from upthread [0] next and see if those can be applied here,
too.
>> TBH
>> I'm beginning to wonder whether all this is really worth it to prevent
>> waking up once per second.
>
> If we can't do it for all cases, do you see any harm in doing it for
> cases where we can achieve it without adding much complexity? We can
> probably add comments for others so that if someone else has better
> ideas in the future we can deal with those as well.
I don't think there's any harm, but I'm also not sure it does a whole lot
of good. At the very least, I think we should figure out something better
than the process_syncing_tables() hacks before taking this patch seriously.
[0] https://postgr.es/m/3220831.1674772625%40sss.pgh.pa.us
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v4-0001-suppress-useless-wakeups-in-logical-worker.c.patch | text/x-diff | 11.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-03-17 00:30:32 | Re: Remove last traces of SCM credential auth from libpq? |
Previous Message | Amit Kapila | 2023-03-17 00:14:15 | Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL |