| From: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se> |
| Subject: | Do we want to solve reload/config races more generally? (was: Postmaster crashes on SIGHUP when oauth_validator_libraries holds only whitespace) |
| Date: | 2026-10-08 18:28:41 |
| Message-ID: | CAOYmi+nxrZ290OJEDN-aw9O2tjXaBtA+kXzBWjKvzSmz-=TckQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-hackers |
On Wed, Sep 30, 2026 at 11:20 AM Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> On Wed, Sep 30, 2026 at 11:00 AM Alexander Lakhin <exclusion(at)gmail(dot)com> wrote:
> > The test addition coined with bca67e5a3 is not very robust,
> > unfortunately. Buildfarm animal serinus found a way to break it [1]
> > as below:
>
> Bleh. These SIGHUP/log file races are really annoying, and I'm going
> to need to trawl the list to see if anyone's proposed a more general
> solution. (I keep thinking about assigning an xid as a generation
> number to an in-memory configuration...)
Moving over to -hackers in case anyone has thoughts. I notice [1]
touched on a similar thing, only with pg_ident/hba.
The general issue, for anyone new to the problem, is that reloading
doesn't wait for the effects of the SIGHUP to complete. (And the
meaning of "complete" depends on the test case.) It feels like this
would pop up in more situations, but the buildfarm doesn't always show
it and it's an easy trap to fall into.
Outside of development, it really seems like a DBA would like to say
"I reloaded the server using <some command> and it succeeded, so now I
_know_ that my changes have been applied."
> For now, is the following test giving us much, or can we remove it?
> We've already done the wait_for_log(). If that "sequence point" turns
> out to be inadequate for some other reason, we'd have to fix it
> anyway.
>
> > is($bgconn->query_safe('SHOW oauth_validator_libraries'),
> > 'validator', 'oauth_validator_libraries restored');
I just pushed a commit removing this check. (We don't need the $bgconn
backend to reflect the current state. We only care that _new_ backends
will adopt the new setting.)
Thanks,
--Jacob
[1] https://postgr.es/m/CAJTYsWWGXJRhefkYs6wZFUOHqE9k5VSoABH2uzke5FMBSmE0%3Dw%40mail.gmail.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Borodin | 2026-10-08 18:53:17 | Re: Do we want to solve reload/config races more generally? (was: Postmaster crashes on SIGHUP when oauth_validator_libraries holds only whitespace) |
| Previous Message | Peter Geoghegan | 2026-10-08 18:21:45 | Re: Assertion failure in _bt_pagedel (leafblkno == scanblkno) after interrupted VACUUM |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2026-10-08 18:30:25 | Re: Parallel vacuum: I/O timings in the log leave out the parallel workers |
| Previous Message | Masahiko Sawada | 2026-10-08 18:27:44 | Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation |