]> granicus.if.org Git - postgresql/commitdiff
report stat() error in trigger file check
authorBruce Momjian <bruce@momjian.us>
Thu, 17 Apr 2014 15:55:57 +0000 (11:55 -0400)
committerBruce Momjian <bruce@momjian.us>
Thu, 17 Apr 2014 15:55:57 +0000 (11:55 -0400)
Permissions might prevent the existence of the trigger file from being
checked.

Per report from Andres Freund

src/backend/access/transam/xlog.c

index 0106cdf63804e9d231b14a3ca699b6311d8f507d..88ad51f9e7d9252e78a8a73fd1cb2abf93a946da 100644 (file)
@@ -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;
 }