提交 20c82fea 编写于 作者: H Heikki Linnakangas

Move 'am_startup' variable to a better place.

I think startup.c is a more natural place for it. Also, xlog.c is so large
and heavily modified from upstream, that anything that we can do to reduce
that diff helps.

Just refactoring, no user-visible change.
上级 e462b2a3
......@@ -120,7 +120,6 @@ bool XLOG_DEBUG = false;
*/
#define XLOGfileslop (2*CheckPointSegments + 1)
bool am_startup = false;
/*
* GUC support
......
......@@ -30,6 +30,7 @@
#include "storage/proc.h"
#include "utils/guc.h"
bool am_startup = false;
/*
* Flags set by interrupt handlers for later service in the redo loop.
......
......@@ -18,7 +18,6 @@
#include "libpq-fe.h"
#include "pqexpbuffer.h"
#include "access/xlog.h"
#include "catalog/gp_segment_config.h"
#include "catalog/pg_proc.h"
#include "catalog/indexing.h"
......@@ -26,6 +25,7 @@
#include "cdb/cdbutil.h"
#include "cdb/cdbvars.h"
#include "cdb/cdbfts.h"
#include "postmaster/startup.h"
#include "utils/builtins.h"
#include "utils/fmgroids.h"
......
......@@ -36,6 +36,7 @@
#include "postmaster/autovacuum.h"
#include "postmaster/fts.h"
#include "postmaster/postmaster.h"
#include "postmaster/startup.h"
#include "replication/walsender.h"
#include "storage/fd.h"
#include "storage/ipc.h"
......
......@@ -241,8 +241,6 @@ extern int wal_level;
/* Do we need to WAL-log information required only for Hot Standby? */
#define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_HOT_STANDBY)
extern bool am_startup;
#ifdef WAL_DEBUG
extern bool XLOG_DEBUG;
#endif
......
......@@ -12,6 +12,8 @@
#ifndef _STARTUP_H
#define _STARTUP_H
extern bool am_startup;
extern void HandleStartupProcInterrupts(void);
extern void StartupProcessMain(void);
extern void PreRestoreCommand(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册