diff options
author | Jeff Davis | 2021-07-09 15:48:19 +0000 |
---|---|---|
committer | Jeff Davis | 2021-07-09 18:37:45 +0000 |
commit | 8e7811e952b4e0993330f7ac1fb1448a1ca69b9a (patch) | |
tree | cc93ddbafcbc6f063996d23454e54f7f9fd682b4 | |
parent | 31e8cfac5845fa57e1805f4ff81e00ab78dff025 (diff) |
Eliminate replication protocol error related to IDENTIFY_SYSTEM.
The requirement that IDENTIFY_SYSTEM be run before START_REPLICATION
was both undocumented and unnecessary. Remove the error and ensure
that ThisTimeLineID is initialized in START_REPLICATION.
Elect not to backport because this requirement was expected behavior
(even if inconsistently enforced), and is not likely to cause any
major problem.
Author: Jeff Davis
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/de4bbf05b7cd94227841c433ea6ff71d2130c713.camel%40j-davis.com
-rw-r--r-- | src/backend/replication/walsender.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 92c755f346e..3ca2a11389d 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -573,11 +573,6 @@ StartReplication(StartReplicationCmd *cmd) StringInfoData buf; XLogRecPtr FlushPtr; - if (ThisTimeLineID == 0) - ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("IDENTIFY_SYSTEM has not been run before START_REPLICATION"))); - /* create xlogreader for physical replication */ xlogreader = XLogReaderAllocate(wal_segment_size, NULL, @@ -619,6 +614,7 @@ StartReplication(StartReplicationCmd *cmd) * that. Otherwise use the timeline of the last replayed record, which is * kept in ThisTimeLineID. */ + am_cascading_walsender = RecoveryInProgress(); if (am_cascading_walsender) { /* this also updates ThisTimeLineID */ |