Peter Eisentraut <peter.eisentr...@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


Reply via email to