From 83defef8c794e7772e4099a7efa2ebac3c62742c Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 17 Apr 2014 11:55:57 -0400 Subject: [PATCH] report stat() error in trigger file check Permissions might prevent the existence of the trigger file from being checked. Per report from Andres Freund --- src/backend/access/transam/xlog.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 0106cdf638..88ad51f9e7 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -11102,6 +11102,12 @@ CheckForStandbyTrigger(void) fast_promote = true; return true; } + else if (errno != ENOENT) + ereport(ERROR, + (errcode_for_file_access(), + errmsg("could not stat trigger file \"%s\": %m", + TriggerFile))); + return false; } -- 2.40.0