Re: Allow file inclusion in pg_hba and pg_ident files - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: Allow file inclusion in pg_hba and pg_ident files
Date
Msg-id 20221112081353.tyjdyu2fvcecdavw@jrouhaud
Whole thread Raw
In response to Re: Allow file inclusion in pg_hba and pg_ident files  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Allow file inclusion in pg_hba and pg_ident files
List pgsql-hackers
On Thu, Nov 10, 2022 at 10:29:40AM +0900, Michael Paquier wrote:
>
> FWIW, I have been playing with the addition of a ErrorContextCallback
> in tokenize_auth_file(), and this addition leads to a really nice
> result.  With this method, it is possible to know the full chain of
> events leading to a failure when tokenizing included files, which is
> not available now in the logs when reloading the server.
>
> We could extend it to have more verbose information by passing more
> arguments to tokenize_auth_file(), still I'd like to think that just
> knowing the line number and the full path to the file is more than
> enough once you know the full chain of events.  0001 and 0002 ought to
> be merged together, but I am keeping these separate to show how simple
> the addition of the ErrorContextCallback is.

It's looks good to me.  I agree that file name and line number should be enough
to diagnose any unexpected error.



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: [PoC] Let libpq reject unexpected authentication requests
Next
From: Amit Kapila
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply