Re: Wake up autovacuum launcher from postmaster when a worker exits
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2026-01-08T22:20:05Z
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
Commits
-
Wake up autovacuum launcher from postmaster when a worker exits
- d9c3c9436537 19 (unreleased) landed
-
Add a multi-worker capability to autovacuum. This allows multiple worker
- e2a186b03cc1 8.3.0 cited