summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-05-11 12:46:08 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-05-11 14:35:38 +0300
commitfbc56f706cdadaaf2a686dacece8b403dfaef50b (patch)
tree633d324bb5b572f05f20dabaf5aae7367db3e9f7 /src/backend/access/transam/xlog.c
parentf71b5c77fa0015492a26838eb489293effee1723 (diff)
Shut down WAL receiver if it's still running at end of recovery. We used to
just check that it's not running and PANIC if it was, but that can rightfully happen if recovery stops at recovery target.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 56f32f6ed8d..bf8075d2ec3 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6289,12 +6289,11 @@ StartupXLOG(void)
}
/*
- * If we launched a WAL receiver, it should be gone by now. It will trump
- * over the startup checkpoint and subsequent records if it's still alive,
- * so be extra sure that it's gone.
+ * Kill WAL receiver, if it's still running, before we continue to write
+ * the startup checkpoint record. It will trump over the checkpoint and
+ * subsequent records if it's still alive when we start writing WAL.
*/
- if (WalRcvInProgress())
- elog(PANIC, "wal receiver still active");
+ ShutdownWalRcv();
/*
* We are now done reading the xlog from stream. Turn off streaming