git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f71b5c7)
Shut down WAL receiver if it's still running at end of recovery. We used to
2011年5月11日 09:46:08 +0000 (12:46 +0300)
2011年5月11日 11:35:38 +0000 (14:35 +0300)
just check that it's not running and PANIC if it was, but that can rightfully
happen if recovery stops at recovery target.


diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 56f32f6ed8da73bf1f4302d916918595f753f450..bf8075d2ec37e103ffc75fd0b9bb17f74b5a5033 100644 (file)
--- 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
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /