Re: wake up logical workers after ALTER SUBSCRIPTION - Mailing list pgsql-hackers

From Tom Lane
Subject Re: wake up logical workers after ALTER SUBSCRIPTION
Date
Msg-id 1353772.1674414774@sss.pgh.pa.us
Whole thread Raw
In response to Re: wake up logical workers after ALTER SUBSCRIPTION  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: wake up logical workers after ALTER SUBSCRIPTION
RE: wake up logical workers after ALTER SUBSCRIPTION
List pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> On Tue, Jan 10, 2023 at 10:59:14AM +0530, Amit Kapila wrote:
>> I haven't looked in detail but isn't it better to explain somewhere in
>> the comments that it achieves to rate limit the restart of workers in
>> case of error and allows them to restart immediately in case of
>> subscription parameter change?

> I expanded one of the existing comments to make this clear.

I pushed v17 with some mostly-cosmetic changes, including more comments.

> Of course, if the launcher restarts, then the notify_pid will no longer be
> accurate.  However, I see that workers also register a before_shmem_exit
> callback that will send SIGUSR1 to the launcher_pid currently stored in
> shared memory.  (I wonder if there is a memory ordering bug here.)

I think it's all close enough in reality.  There are other issues in
this code, and I'm about to start a new thread about one I identified
while testing this patch, but I think we're in good shape on this
particular point.  I've marked the CF entry as committed.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Isaac Morland
Date:
Subject: Re: Remove source code display from \df+?
Next
From: Alvaro Herrera
Date:
Subject: Re: Remove source code display from \df+?