Re: Postmaster crashes on SIGHUP when oauth_validator_libraries holds only whitespace

From: Grigorev Jurij <ju(dot)grigorev(at)ftdata(dot)ru>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Postmaster crashes on SIGHUP when oauth_validator_libraries holds only whitespace
Date: 2026-09-16 08:27:56
Message-ID: 0bc0874d0b774514a61d8d7b30825e0f@localhost.localdomain
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Daniel,

You're right. I would rather not treat NULL as an empty setting, since
that would turn an internal programming error into the user-facing
"must be set" error. Attached v3 adds:

Assert(oauth_validator_libraries_string != NULL);

before the pstrdup().

I also moved the whitespace-only TAP case to after the
pg_hba_file_rules() check. Its previous position made the test racy:
wait_for_log() synchronized with the postmaster reload, but not
necessarily with the process-local GUC state of the existing bgconn.
As a result, pg_hba_file_rules() could run in a backend that still had
the whitespace value loaded and return unexpected empty fields.

Moving the case after that assertion avoids making the
pg_hba_file_rules() result depend on the timing of SIGHUP processing in
bgconn. After restoring the setting, the test runs SHOW
oauth_validator_libraries through bgconn, ensuring that the backend has
processed the second SIGHUP before the later tests continue.

Thanks,
Yuriy

Attachment Content-Type Size
v3-0001-Fix-postmaster-crash-on-whitespace-only-oauth_valida.patch application/octet-stream 4.1 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Korotkov 2026-09-16 10:15:29 Re: BUG #19633: Unexpected results of IN (subquery) with a non-deterministic collation
Previous Message Manuel Reyes Bravo 2026-09-16 07:14:40 Re: Detaching a child table makes an expression using it unrestorable