Commit d1b95821 authored by Andres Freund's avatar Andres Freund

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.
parent 94d6727d
...@@ -7587,7 +7587,7 @@ HotStandbyActive(void) ...@@ -7587,7 +7587,7 @@ HotStandbyActive(void)
bool bool
HotStandbyActiveInReplay(void) HotStandbyActiveInReplay(void)
{ {
Assert(AmStartupProcess()); Assert(AmStartupProcess() || !IsPostmasterEnvironment);
return LocalHotStandbyActive; return LocalHotStandbyActive;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment