postgres.git / summary / log / commit / refs
commit 0db10d4e92b655dbb3cb3a08830783107e5f9e60
Author: Andres Freund <andres@anarazel.de>
Date: Sun Jun 07 22:30:26 2015 +0000
First released in: 9.5.0, 9.2.13, 9.3.9, 9.4.4
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.
src/backend/access/transam/xlog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index a699ff8b567..d1b381101b6 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7575,7 +7575,7 @@ HotStandbyActive(void)
bool
HotStandbyActiveInReplay(void)
{
- Assert(AmStartupProcess());
+ Assert(AmStartupProcess() || !IsPostmasterEnvironment);
return LocalHotStandbyActive;
}
[parent: be25a08a9140]