summaryrefslogtreecommitdiff
path: root/src/backend/access
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 12:46:08 +0300
commita0c8514149de92d48a8cf0f1a1458486851980a4 (patch)
treecb4f6806a9cddb5603800a392334b3e8a76c7878 /src/backend/access
parentea964a451e51a32b71d004d261874adb1e135066 (diff)
downloadpostgresql-a0c8514149de92d48a8cf0f1a1458486851980a4.tar.gz
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')
-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 b0e4c41d6f..e71090f71b 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6611,12 +6611,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 don't need the latch anymore. It's not strictly necessary to disown