| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Wake up autovacuum launcher from postmaster when a worker exits |
| Date: | 2026-01-08 23:01:54 |
| Message-ID: | CAD21AoDGYt09cW7D=_zx2b0orcE9uF7YRxrin1Vtmgb99xEMeA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Jan 8, 2026 at 11:57 AM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
> When an autovacuum worker exits, ProcKill() sends SIGUSR2 to the
> launcher. I propose moving that responsibility to the postmaster, because:
>
> * It's simpler IMHO
>
> * The postmaster is already responsible for sending the signal if fork()
> fails
>
> * It makes it consistent with background workers. When a background
> worker exits, the postmaster sends the signal to the launching process
> (if requested).
>
> * Postmaster doesn't need to worry about sending the signal to the wrong
> process if the launcher's PID is reused, because it always has
> up-to-date PID information, because the launcher is postmaster's child
> process. That risk was negligible to begin with, but this eliminates
> completely, so we don't need the comment excusing it it anymore.
It sounds reasonable to me too. +1.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-01-08 23:29:38 | Re: pg_plan_advice |
| Previous Message | Haibo Yan | 2026-01-08 22:52:29 | Re: pg_plan_advice |