Skip to content

Commit 52003bf

Browse files
committed
doc: wire protocol data type for history file content is bytea
Document that though the history file content is marked as bytea, it is the same a text, and neither is btyea-escaped or encoding converted. Reported-by: Brar Piening Discussion: https://postgr.es/m/6a1b9cd9-17e3-df67-be55-86102af6bdf5@gmx.de Backpatch-through: 13 - 9.5 (not master)
1 parent 48ab1fa commit 52003bf

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

doc/src/sgml/protocol.sgml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,10 @@ The commands accepted in replication mode are:
18591859
<para>
18601860
Requests the server to send over the timeline history file for timeline
18611861
<replaceable class="parameter">tli</replaceable>. Server replies with a
1862-
result set of a single row, containing two fields:
1862+
result set of a single row, containing two fields. While the
1863+
fields are labeled as <type>text</type> and <type>bytea</type>,
1864+
they effectively return raw bytes, with no escaping or encoding
1865+
conversion:
18631866
</para>
18641867

18651868
<para>

src/backend/replication/walsender.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ SendTimeLineHistory(TimeLineHistoryCmd *cmd)
496496
pq_sendstring(&buf, "content"); /* col name */
497497
pq_sendint32(&buf, 0); /* table oid */
498498
pq_sendint16(&buf, 0); /* attnum */
499+
/*
500+
* While this is labeled as BYTEAOID, it is the same output format
501+
* as TEXTOID above.
502+
*/
499503
pq_sendint32(&buf, BYTEAOID); /* type oid */
500504
pq_sendint16(&buf, -1); /* typlen */
501505
pq_sendint32(&buf, 0); /* typmod */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy