From: Bruce Momjian Date: Thu, 17 Apr 2014 15:55:57 +0000 (-0400) Subject: report stat() error in trigger file check X-Git-Tag: REL9_4_BETA1~150 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83defef8c794e7772e4099a7efa2ebac3c62742c;p=thirdparty%2Fpostgresql.git report stat() error in trigger file check Permissions might prevent the existence of the trigger file from being checked. Per report from Andres Freund --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 0106cdf6380..88ad51f9e7d 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; }