mirror of
https://github.com/postgres/postgres.git
synced 2025-07-20 05:03:10 +03:00
Shut down WAL receiver if it's still running at end of recovery. We used to
just check that it's not running and PANIC if it was, but that can rightfully happen if recovery stops at recovery target.
This commit is contained in:
@ -6289,12 +6289,11 @@ StartupXLOG(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we launched a WAL receiver, it should be gone by now. It will trump
|
* Kill WAL receiver, if it's still running, before we continue to write
|
||||||
* over the startup checkpoint and subsequent records if it's still alive,
|
* the startup checkpoint record. It will trump over the checkpoint and
|
||||||
* so be extra sure that it's gone.
|
* subsequent records if it's still alive when we start writing WAL.
|
||||||
*/
|
*/
|
||||||
if (WalRcvInProgress())
|
ShutdownWalRcv();
|
||||||
elog(PANIC, "wal receiver still active");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We are now done reading the xlog from stream. Turn off streaming
|
* We are now done reading the xlog from stream. Turn off streaming
|
||||||
|
Reference in New Issue
Block a user