File tree Expand file tree Collapse file tree 17 files changed +75
-67
lines changed Expand file tree Collapse file tree 17 files changed +75
-67
lines changed Original file line number Diff line number Diff line change 8888
8989#include "access/heapam_xlog.h"
9090#include "access/visibilitymap.h"
91- #include "access/xlog .h"
91+ #include "access/xlogutils .h"
9292#include "miscadmin.h"
9393#include "port/pg_bitutils.h"
9494#include "storage/bufmgr.h"
Original file line number Diff line number Diff line change 2828#include "access/htup_details.h"
2929#include "access/slru.h"
3030#include "access/transam.h"
31+ #include "access/xlogutils.h"
3132#include "catalog/pg_type.h"
3233#include "funcapi.h"
3334#include "miscadmin.h"
Original file line number Diff line number Diff line change 7474#include "access/twophase.h"
7575#include "access/twophase_rmgr.h"
7676#include "access/xact.h"
77- #include "access/xlog.h"
7877#include "access/xloginsert.h"
78+ #include "access/xlogutils.h"
7979#include "catalog/pg_type.h"
8080#include "commands/dbcommands.h"
8181#include "funcapi.h"
Original file line number Diff line number Diff line change 5454#include "access/slru.h"
5555#include "access/transam.h"
5656#include "access/xlog.h"
57+ #include "access/xlogutils.h"
5758#include "miscadmin.h"
5859#include "pgstat.h"
5960#include "storage/fd.h"
Original file line number Diff line number Diff line change 1818#include "access/subtrans.h"
1919#include "access/transam.h"
2020#include "access/xact.h"
21- #include "access/xlog .h"
21+ #include "access/xlogutils .h"
2222#include "commands/dbcommands.h"
2323#include "miscadmin.h"
2424#include "postmaster/autovacuum.h"
Original file line number Diff line number Diff line change @@ -193,22 +193,6 @@ CheckpointStatsData CheckpointStats;
193193 */
194194TimeLineID ThisTimeLineID = 0 ;
195195
196- /*
197- * Are we doing recovery from XLOG?
198- *
199- * This is only ever true in the startup process; it should be read as meaning
200- * "this process is replaying WAL records", rather than "the system is in
201- * recovery mode". It should be examined primarily by functions that need
202- * to act differently when called from a WAL redo function (e.g., to skip WAL
203- * logging). To check whether the system is in recovery regardless of which
204- * process you're running in, use RecoveryInProgress() but only after shared
205- * memory startup and lock initialization.
206- */
207- bool InRecovery = false;
208-
209- /* Are we in Hot Standby mode? Only valid in startup process, see xlog.h */
210- HotStandbyState standbyState = STANDBY_DISABLED ;
211-
212196static XLogRecPtr LastRec ;
213197
214198/* Local copy of WalRcv->flushedUpto */
Original file line number Diff line number Diff line change 2525#include "access/xlogutils.h"
2626#include "miscadmin.h"
2727#include "pgstat.h"
28+ #include "storage/fd.h"
2829#include "storage/smgr.h"
2930#include "utils/guc.h"
3031#include "utils/hsearch.h"
3435/* GUC variable */
3536bool ignore_invalid_pages = false;
3637
38+ /*
39+ * Are we doing recovery from XLOG?
40+ *
41+ * This is only ever true in the startup process; it should be read as meaning
42+ * "this process is replaying WAL records", rather than "the system is in
43+ * recovery mode". It should be examined primarily by functions that need
44+ * to act differently when called from a WAL redo function (e.g., to skip WAL
45+ * logging). To check whether the system is in recovery regardless of which
46+ * process you're running in, use RecoveryInProgress() but only after shared
47+ * memory startup and lock initialization.
48+ *
49+ * This is updated from xlog.c, but lives here because it's mostly read by
50+ * WAL redo functions.
51+ */
52+ bool InRecovery = false;
53+
54+ /* Are we in Hot Standby mode? Only valid in startup process, see xlogutils.h */
55+ HotStandbyState standbyState = STANDBY_DISABLED ;
56+
3757/*
3858 * During XLOG replay, we may see XLOG records for incremental updates of
3959 * pages that no longer exist, because their relation was later dropped or
Original file line number Diff line number Diff line change 5656#include "access/sysattr.h"
5757#include "access/tableam.h"
5858#include "access/xact.h"
59- #include "access/xlog.h"
6059#include "access/xloginsert.h"
60+ #include "access/xlogutils.h"
6161#include "catalog/catalog.h"
6262#include "catalog/dependency.h"
6363#include "catalog/indexing.h"
Original file line number Diff line number Diff line change 2020#include "postgres.h"
2121
2222#include "access/xlog.h"
23+ #include "access/xlogutils.h"
2324#include "libpq/pqsignal.h"
2425#include "miscadmin.h"
2526#include "pgstat.h"
Original file line number Diff line number Diff line change 3434#include <unistd.h>
3535
3636#include "access/tableam.h"
37- #include "access/xlog .h"
37+ #include "access/xlogutils .h"
3838#include "catalog/catalog.h"
3939#include "catalog/storage.h"
4040#include "executor/instrument.h"
You can’t perform that action at this time.
0 commit comments