Skip to content
Snippets Groups Projects
Commit a383c55a authored by Heikki Linnakangas's avatar Heikki Linnakangas
Browse files

Throw a nicer error message if a standby server attempts to connect while

the master is still in recovery. We don't support cascading slaves yet.

Patch by Fujii Masao, with slightly changed wording.
parent bd11a0f6
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.9 2010/02/26 02:00:58 momjian Exp $
* $PostgreSQL: pgsql/src/backend/replication/walsender.c,v 1.10 2010/03/16 09:09:55 heikki Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -119,6 +119,11 @@ WalSenderMain(void)
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("must be superuser to start walsender")));
if (RecoveryInProgress())
ereport(FATAL,
(errcode(ERRCODE_CANNOT_CONNECT_NOW),
errmsg("recovery is still in progress, can't accept WAL streaming connections")));
/* Create a per-walsender data structure in shared memory */
InitWalSnd();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment