diff options
author | Andres Freund <andres@anarazel.de> | 2015-06-08 00:30:26 +0200 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-06-08 14:09:52 +0200 |
commit | 18935145e7f31ca975e0763f73c8c3f12aa62672 (patch) | |
tree | 163006808ec934c6aad8a6bf6aa24d488f53c193 | |
parent | 3e69a73b98abbbca7aefd77451e9197a4eea2b6e (diff) | |
download | postgresql-18935145e7f31ca975e0763f73c8c3f12aa62672.tar.gz postgresql-18935145e7f31ca975e0763f73c8c3f12aa62672.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 9ff3069504e..ea1af8ccbba 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7627,7 +7627,7 @@ HotStandbyActive(void) bool HotStandbyActiveInReplay(void) { - Assert(AmStartupProcess()); + Assert(AmStartupProcess() || !IsPostmasterEnvironment); return LocalHotStandbyActive; } |