On 7/21/26 9:54 AM, Michael Paquier wrote:
On Tue, Jul 21, 2026 at 02:41:08PM +0700, Tofig Aliev wrote:
Background processes calling load_hba()/load_ident() may see
undefined behavior because PostmasterContext is already gone.
This patch adds proper context cleanup to prevent this issue.
Why would you want to do that? I don't necessarily object to a change
like that, just wondering why somebody would be interesting in calling
these APIs from a bgworker context.
I could imagine it could be useful if someone would want to implement
another frontend protocol, e.g. for emulating MongoDB, but still would
want to enforce the rules from the HBA file but as I have never tried to
build such a system I am not sure.
Andreas