Re: Silent failure with invalid hba_file setting

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Silent failure with invalid hba_file setting
Дата
Msg-id CAA-aLv59ugbU6Xbn47FHAgo2R+uEorPB4AGhmcHDwLcu8M7MOw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Silent failure with invalid hba_file setting  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 19 October 2011 00:38, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thom Brown <thom@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Silent failure with invalid hba_file setting
Следующее
От: Robert Haas
Дата:
Сообщение: Re: termination of backend waiting for sync rep generates a junk log message