Re: could not stat promote trigger file leads to shutdown

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: could not stat promote trigger file leads to shutdown
Дата
Msg-id 22295.1573745910@sss.pgh.pa.us
обсуждение исходный текст
Ответ на could not stat promote trigger file leads to shutdown  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: could not stat promote trigger file leads to shutdown  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> I have seen the error
>      could not stat promote trigger file "...": Permission denied
> because of a misconfiguration (for example, setting promote_trigger_file 
> to point into a directory to which you don't have appropriate read or 
> execute access).

> The problem is that because this happens in the startup process, the 
> ERROR is turned into a FATAL and the whole instance shuts down.  That 
> seems like a harsh penalty.  Would it be better to turn this ERROR into 
> a WARNING?

It is harsh, but I suspect if we just logged the complaint, we'd get
bug reports about "Postgres isn't reacting to my trigger file",
because people don't read the postmaster log unless forced to.
Is there some more-visible way to report the problem, short of
shutting down?

(BTW, from this perspective, WARNING is especially bad because it
might not get logged at all.  Better to use LOG.)

One thought is to try to detect the misconfiguration at postmaster
start --- better to fail at startup than sometime later.  But I'm
not sure how reliably we could do that.

            regards, tom lane



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

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: 2019-11-14 Press Release Draft
Следующее
От: Martin Liška
Дата:
Сообщение: Re: segfault in geqo on experimental gcc animal