Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8e7811e

Browse files
committed
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
1 parent 31e8cfa commit 8e7811e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/backend/replication/walsender.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,6 @@ StartReplication(StartReplicationCmd *cmd)
573573
StringInfoData buf;
574574
XLogRecPtr FlushPtr;
575575

576-
if (ThisTimeLineID == 0)
577-
ereport(ERROR,
578-
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
579-
errmsg("IDENTIFY_SYSTEM has not been run before START_REPLICATION")));
580-
581576
/* create xlogreader for physical replication */
582577
xlogreader =
583578
XLogReaderAllocate(wal_segment_size, NULL,
@@ -619,6 +614,7 @@ StartReplication(StartReplicationCmd *cmd)
619614
* that. Otherwise use the timeline of the last replayed record, which is
620615
* kept in ThisTimeLineID.
621616
*/
617+
am_cascading_walsender = RecoveryInProgress();
622618
if (am_cascading_walsender)
623619
{
624620
/* this also updates ThisTimeLineID */

0 commit comments

Comments
 (0)