diff --git a/src/bin/pg_ctl/pg_ctl.cpp b/src/bin/pg_ctl/pg_ctl.cpp index d329c5013..9c1675d74 100755 --- a/src/bin/pg_ctl/pg_ctl.cpp +++ b/src/bin/pg_ctl/pg_ctl.cpp @@ -1940,7 +1940,7 @@ static void do_stop(bool force) break; } - if (pid != 0) { /* pid file still exists */ + if ((pid = get_pgpid()) != 0) { /* pid file still exists */ if (force || (shutdown_mode == IMMEDIATE_MODE)) { kill_proton_force();