Fix attlen in RowDescription of BASE_BACKUP response
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 4 Jul 2022 05:25:26 +0000 (07:25 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 4 Jul 2022 05:31:54 +0000 (07:31 +0200)
Should be 8 for int8, not -1.

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/7e4fdbdc-699c-4cd0-115d-fb78a957fc22@enterprisedb.com

src/backend/replication/basebackup_copy.c

index cabb077240200fa5d4ea0d06580c91c69bee22fb..1eed9d8c3f79454357c6a14a7b27e655d4659259 100644 (file)
@@ -361,7 +361,7 @@ SendXlogRecPtrResult(XLogRecPtr ptr, TimeLineID tli)
         * would not be wide enough for this, as TimeLineID is unsigned.
         */
        pq_sendint32(&buf, INT8OID);    /* type oid */
-       pq_sendint16(&buf, -1);
+       pq_sendint16(&buf, 8);
        pq_sendint32(&buf, 0);
        pq_sendint16(&buf, 0);
        pq_endmessage(&buf);