Skip to content

Commit b7b5a18

Browse files
committed
In pg_ctl, report unexpected failure to stat() the postmaster.pid file.
Any error other than ENOENT is a bit suspicious here, and perhaps should not be grounds for assuming the postmaster has failed. For the moment though, just report it, and don't change the behavior otherwise. The intent is mainly to try to determine why we are seeing intermittent failures in this area on some buildfarm members. Back-patch to 9.5 where some of these failures have happened.
1 parent 158d615 commit b7b5a18

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/pg_ctl/pg_ctl.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,12 @@ test_postmaster_connection(bool do_checkpoint)
648648
struct stat statbuf;
649649

650650
if (stat(pid_file, &statbuf) != 0)
651+
{
652+
if (errno != ENOENT)
653+
write_stderr(_("\n%s: could not stat file \"%s\": %s\n"),
654+
progname, pid_file, strerror(errno));
651655
return PQPING_NO_RESPONSE;
656+
}
652657

653658
if (found_stale_pidfile)
654659
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy