aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-06-08 00:30:26 +0200
committerAndres Freund <andres@anarazel.de>2015-06-08 14:09:27 +0200
commitd1b958218ac183d0e88348341ff6ba31397086ad (patch)
tree019c1abc6c7330669b247ecf33c9ca4577a768dc
parent94d6727dbe61117addd9c24eea28440a2151ccf4 (diff)
downloadpostgresql-d1b958218ac183d0e88348341ff6ba31397086ad.tar.gz
postgresql-d1b958218ac183d0e88348341ff6ba31397086ad.zip
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 666fa37e2a3..b732a9d76f7 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7587,7 +7587,7 @@ HotStandbyActive(void)
bool
HotStandbyActiveInReplay(void)
{
- Assert(AmStartupProcess());
+ Assert(AmStartupProcess() || !IsPostmasterEnvironment);
return LocalHotStandbyActive;
}