We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent1b794d3 commitffda059Copy full SHA for ffda059
src/bin/pg_basebackup/receivelog.c
@@ -342,6 +342,21 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
342
int64last_status=-1;
343
XLogRecPtrblockpos=InvalidXLogRecPtr;
344
345
+/*
346
+ * The message format used in streaming replication changed in 9.3, so we
347
+ * cannot stream from older servers. Don't know if we would work with
348
+ * newer versions, but let's not take the risk.
349
+ */
350
+if (PQserverVersion(conn) /100!=PG_VERSION_NUM /100)
351
+{
352
+constchar*serverver=PQparameterStatus(conn,"server_version");
353
+fprintf(stderr,_("%s: incompatible server version %s; streaming is only supported with server version %s\n"),
354
+progname,
355
+serverver ?serverver :"'unknown'",
356
+PG_MAJORVERSION);
357
+return false;
358
+}
359
+
360
if (sysidentifier!=NULL)
361
{
362
/* Validate system identifier and timeline hasn't changed */