Re: Wake up autovacuum launcher from postmaster when a worker exits - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Wake up autovacuum launcher from postmaster when a worker exits
Date
Msg-id aWAtlZOhQWgzHiR4@nathan
Whole thread Raw
In response to Wake up autovacuum launcher from postmaster when a worker exits  (Heikki Linnakangas <hlinnaka@iki.fi>)
List 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



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Next
From: Peter Smith
Date:
Subject: Fix how some lists are displayed by psql \d+