Skip to content

Commit 5ee2197

Browse files
Ensure ThisTimeLineID is valid before START_REPLICATION
Craig Ringer
1 parent 1fff35d commit 5ee2197

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/replication/walsender.c

+5
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,11 @@ StartReplication(StartReplicationCmd *cmd)
488488
StringInfoData buf;
489489
XLogRecPtr FlushPtr;
490490

491+
if (ThisTimeLineID == 0)
492+
ereport(ERROR,
493+
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
494+
errmsg("IDENTIFY_SYSTEM has not been run before START_REPLICATION")));
495+
491496
/*
492497
* We assume here that we're logging enough information in the WAL for
493498
* log-shipping, since this is checked in PostmasterMain().

0 commit comments

Comments
 (0)