mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Move InRecovery and standbyState global vars to xlogutils.c.
They are used in code that runs both during normal operation and during WAL replay, and needs to behave differently during replay. Move them to xlogutils.c, because that's where we have other helper functions used by redo routines. Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/message-id/b3b71061-4919-e882-4857-27e370ab134a%40iki.fi
This commit is contained in:
@ -193,22 +193,6 @@ CheckpointStatsData CheckpointStats;
|
||||
*/
|
||||
TimeLineID ThisTimeLineID = 0;
|
||||
|
||||
/*
|
||||
* Are we doing recovery from XLOG?
|
||||
*
|
||||
* This is only ever true in the startup process; it should be read as meaning
|
||||
* "this process is replaying WAL records", rather than "the system is in
|
||||
* recovery mode". It should be examined primarily by functions that need
|
||||
* to act differently when called from a WAL redo function (e.g., to skip WAL
|
||||
* logging). To check whether the system is in recovery regardless of which
|
||||
* process you're running in, use RecoveryInProgress() but only after shared
|
||||
* memory startup and lock initialization.
|
||||
*/
|
||||
bool InRecovery = false;
|
||||
|
||||
/* Are we in Hot Standby mode? Only valid in startup process, see xlog.h */
|
||||
HotStandbyState standbyState = STANDBY_DISABLED;
|
||||
|
||||
static XLogRecPtr LastRec;
|
||||
|
||||
/* Local copy of WalRcv->flushedUpto */
|
||||
|
Reference in New Issue
Block a user