| From: | Nathan Bossart <nathandbossart(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 22:20:05 |
| Message-ID: | aWAtlZOhQWgzHiR4@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Jan 08, 2026 at 09:57:38PM +0200, Heikki Linnakangas wrote:
> When an autovacuum worker exits, ProcKill() sends SIGUSR2 to the launcher. I
> propose moving that responsibility to the postmaster, because:
This seems generally reasonable to me. So does the patch.
> * It makes it consistent with background workers. When a background worker
> exits, the postmaster sends the signal to the launching process (if
> requested).
I've wondered about making autovacuum workers proper background workers.
> I'm a little surprised it wasn't done this way to begin with, so I wonder if
> I'm missing something?
This code dates back to commit e2a186b03c. I skimmed through the nearby
thread [0] and didn't immediately notice any discussion about this. My
guess is that it seemed simpler to directly alert the launcher, since it's
the one that needs to take action.
[0] https://postgr.es/m/flat/20070404233954.GK19251%40alvh.no-ip.org
--
nathan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2026-01-08 22:47:19 | Fix how some lists are displayed by psql \d+ |
| Previous Message | Masahiko Sawada | 2026-01-08 22:14:25 | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |