Commit 5ee21977 authored by Simon Riggs's avatar Simon Riggs

Ensure ThisTimeLineID is valid before START_REPLICATION

Craig Ringer
parent 1fff35d8
...@@ -488,6 +488,11 @@ StartReplication(StartReplicationCmd *cmd) ...@@ -488,6 +488,11 @@ StartReplication(StartReplicationCmd *cmd)
StringInfoData buf; StringInfoData buf;
XLogRecPtr FlushPtr; XLogRecPtr FlushPtr;
if (ThisTimeLineID == 0)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("IDENTIFY_SYSTEM has not been run before START_REPLICATION")));
/* /*
* We assume here that we're logging enough information in the WAL for * We assume here that we're logging enough information in the WAL for
* log-shipping, since this is checked in PostmasterMain(). * log-shipping, since this is checked in PostmasterMain().
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment