0002-Change-timeline-field-of-IDENTIFY_SYSTEM-to-int8.patch

text/plain

Filename: 0002-Change-timeline-field-of-IDENTIFY_SYSTEM-to-int8.patch
Type: text/plain
Part: 1
Message: refactor some protocol message sending in walsender and basebackup

Patch

Format: format-patch
Series: patch 0002
Subject: Change timeline field of IDENTIFY_SYSTEM to int8
File+
doc/src/sgml/protocol.sgml 1 1
src/backend/replication/walsender.c 1 1
From 045730e92bb67806f31fee033e1f87c69c8ae08e Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Thu, 23 Jun 2022 10:56:55 +0200
Subject: [PATCH 2/4] Change timeline field of IDENTIFY_SYSTEM to int8

It was int4, but in the other replication commands, timelines are
returned as int8.
---
 doc/src/sgml/protocol.sgml          | 2 +-
 src/backend/replication/walsender.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index a94743b587..c0b89a3c01 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1838,7 +1838,7 @@ <title>Streaming Replication Protocol</title>
        </varlistentry>
 
        <varlistentry>
-        <term><literal>timeline</literal> (<type>int4</type>)</term>
+        <term><literal>timeline</literal> (<type>int8</type>)</term>
         <listitem>
          <para>
           Current timeline ID. Also useful to check that the standby is
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index e42671722a..fa60c92e13 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -444,7 +444,7 @@ IdentifySystem(void)
 	TupleDescInitBuiltinEntry(tupdesc, (AttrNumber) 1, "systemid",
 							  TEXTOID, -1, 0);
 	TupleDescInitBuiltinEntry(tupdesc, (AttrNumber) 2, "timeline",
-							  INT4OID, -1, 0);
+							  INT8OID, -1, 0);
 	TupleDescInitBuiltinEntry(tupdesc, (AttrNumber) 3, "xlogpos",
 							  TEXTOID, -1, 0);
 	TupleDescInitBuiltinEntry(tupdesc, (AttrNumber) 4, "dbname",
-- 
2.36.1