summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2015-06-07 22:30:26 +0000
committerAndres Freund2015-06-08 12:09:49 +0000
commit82f81ba0852a3d732b39aae131a9fae419fee4a6 (patch)
treea1872145f0b85ed3f978d2d9acafcc238fa99a2b
parent4f2458dd78d6da4a716a3d976644b3b2e627bc75 (diff)
Allow HotStandbyActiveInReplay() to be called in single user mode.
HotStandbyActiveInReplay, introduced in 061b079f, only allowed WAL replay to happen in the startup process, missing the single user case. This buglet is fairly harmless as it only causes problems when single user mode in an assertion enabled build is used to replay a btree vacuum record. Backpatch to 9.2. 061b079f was backpatched further, but the assertion was not.
-rw-r--r--src/backend/access/transam/xlog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index b974b3d438a..9d160daa6ce 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6442,7 +6442,7 @@ HotStandbyActive(void)
bool
HotStandbyActiveInReplay(void)
{
- Assert(AmStartupProcess());
+ Assert(AmStartupProcess() || !IsPostmasterEnvironment);
return LocalHotStandbyActive;
}