mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
pg_upgrade: check for clean server shutdowns
Previously pg_upgrade checked for the pid file and started/stopped the server to force a clean shutdown. However, "pg_ctl -m immediate" removes the pid file but doesn't do a clean shutdown, so check pg_controldata for a clean shutdown too. Diagnosed-by: Vimalraj A Discussion: https://postgr.es/m/CAFKBAK5e4Q-oTUuPPJ56EU_d2Rzodq6GWKS3ncAk3xo7hAsOZg@mail.gmail.com Backpatch-through: 9.3
This commit is contained in:
@ -367,7 +367,8 @@ setup(char *argv0, bool *live_check)
|
||||
* start, assume the server is running. If the pid file is left over
|
||||
* from a server crash, this also allows any committed transactions
|
||||
* stored in the WAL to be replayed so they are not lost, because WAL
|
||||
* files are not transfered from old to new servers.
|
||||
* files are not transfered from old to new servers. We later check
|
||||
* for a clean shutdown.
|
||||
*/
|
||||
if (start_postmaster(&old_cluster, false))
|
||||
stop_postmaster(false);
|
||||
|
Reference in New Issue
Block a user