Commit 83defef8 authored by Bruce Momjian's avatar Bruce Momjian

report stat() error in trigger file check

Permissions might prevent the existence of the trigger file from being
checked.

Per report from Andres Freund
parent c1275cf7
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment