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?

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to