On Tue, Oct 18, 2022 at 09:14:21AM +0200, Drouvot, Bertrand wrote: > BTW, what about adding a new TAP test (dedicated patch) to test the behavior > in case of errors during the regexes compilation in pg_ident.conf and > pg_hba.conf (not done yet)? (we could add it once this patch series is > done).
Perhaps, that may become tricky when it comes to -DEXEC_BACKEND (for cases where no fork() implementation is available, aka Windows). But a postmaster restart failure would generate logs that could be picked for a pattern check? >> While putting my hands on that, I was also wondering whether we should >> have the error string generated after compilation within the internal >> regcomp() routine, but that would require more arguments to >> pg_regcomp() (as of file name, line number, **err_string), and that >> looks more invasive than necessary. Perhaps the follow-up steps will >> prove me wrong, though :) > > I've had the same thought (and that was what the previous global patch was > doing). I'm tempted to think that the follow-steps will prove you right ;-) > (specially if at the end those will be the same error messages for databases > and roles). Avoiding three times the same error message seems like a good thing in the long run, but let's think about this part later as needed. All these routines are static to hba.c so even if we finish by not finishing the whole job for this development cycle we can still be very flexible. -- Michael
signature.asc
Description: PGP signature