report stat() error in trigger file check

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

Per report from Andres Freund
This commit is contained in:
Bruce Momjian 2014-04-17 11:55:57 -04:00
parent c1275cf741
commit 83defef8c7

View 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;
}