On 19 October 2011 00:38, Tom Lane <t...@sss.pgh.pa.us> wrote: > Thom Brown <t...@linux.com> writes: >> I noticed that if the hba_file setting in the config is uncommented >> and set to a directory instead of the full path to the file, no error >> occurs when the service starts. > > When I try that, I get a boatload of errors ending with > FATAL: could not load pg_hba.conf > > I suspect what happened to you is that the directory read like an empty > file, so Postgres didn't see any error condition. I suppose we could > add an fstat test to see if we'd opened something other than a regular > file, but I'm not terribly excited about it. > >> The problem with this is you cannot get into the database as it acts >> as if it did find the hba file but found it empty. > > Well, an actually empty pg_hba.conf file would have the same problem, > and it's pretty hard to see any situation where it would be useful to > start the postmaster and not let it accept any connections. Should we > add a check to consider it an error if the file doesn't contain at least > one HBA record?
That would solve both problems, so +1 for that. -- Thom Brown Twitter: @darkixion IRC (freenode): dark_ixion Registered Linux user: #516935 EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers