Re: Parsing of pg_hba.conf and authentication inconsistencies - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Parsing of pg_hba.conf and authentication inconsistencies
Date
Msg-id 3812.1217691528@sss.pgh.pa.us
Whole thread Raw
In response to Parsing of pg_hba.conf and authentication inconsistencies  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Parsing of pg_hba.conf and authentication inconsistencies  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Parsing of pg_hba.conf and authentication inconsistencies  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> Is there any actual gain by not doing the parsing in the postmaster,

Define "parsing".  There's quite a lot of possible errors in pg_hba
that it would be totally unreasonable for the postmaster to detect.
We could catch some simple problems at file load time, perhaps,
but those usually aren't the ones that cause trouble for people.

On the whole, I am against putting any more functionality into the
main postmaster process than absolutely has to be there.  Every
new function you put onto it is another potential source of
service-outage-inducing bugs.

> I've also noticed that authentication methods error out in different
> ways when they are not supported.

Yeah, that's something that should be made more consistent.


Idle thought: maybe what would really make sense here is a "lint"
for PG config files, which you'd run as a standalone program and
which would look for not only clear errors but questionable things
to warn about.  For instance it might notice multiple pg_hba.conf
entries for the same IP addresses, check whether an LDAP server
can be connected to, check that all user/group/database names
used in the file actually exist, etc.  These are things that we'd
certainly not put into any load- or reload-time tests.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] odd output in restore mode
Next
From: Alvaro Herrera
Date:
Subject: Re: Parsing of pg_hba.conf and authentication inconsistencies