Re: Fix assertion in autovacuum worker - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Fix assertion in autovacuum worker
Date
Msg-id 20231129175201.GA902323@nathanxps13
Whole thread Raw
In response to Re: Fix assertion in autovacuum worker  (Andres Freund <andres@anarazel.de>)
Responses Re: Fix assertion in autovacuum worker
List pgsql-hackers
On Tue, Nov 28, 2023 at 06:48:59PM -0800, Andres Freund wrote:
> On 2023-11-28 20:42:47 -0600, Nathan Bossart wrote:
>> Right.  Perhaps we could add a LWLockReleaseAll() to
>> pgstat_shutdown_hook() instead of the autovacuum code, but I'm afraid that
>> is still just a hack.
> 
> Yea, we'd need that in just about all before_shmem_exit() callbacks.  I could
> see an argument for doing it in proc_exit_prepare(). While that'd be a fairly
> gross layering violation, we already do reset a number a bunch of stuff in
> there:

Gross layering violations aside, that at least seems more future-proof
against other sigsetjmp() blocks that proc_exit() without doing any
preliminary cleanup.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: "Tristan Partin"
Date:
Subject: Re: psql not responding to SIGINT upon db reconnection
Next
From: Tomas Vondra
Date:
Subject: Re: Parallel CREATE INDEX for BRIN indexes