Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 66a8f09

Browse filesBrowse files
committed
change wire protocol data type for history file content
This was marked as BYTEA, but is more like TEXT, which is how we already pass the history timeline file name. Internally, we don't do any encoding or bytea escape handling, but TEXT seems closest. This should cause no behavioral change. Reported-by: Brar Piening Discussion: https://postgr.es/m/6a1b9cd9-17e3-df67-be55-86102af6bdf5@gmx.de Backpatch-through: master
1 parent 951dfa3 commit 66a8f09
Copy full SHA for 66a8f09

File tree

Expand file treeCollapse file tree

2 files changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-3
lines changed

‎doc/src/sgml/protocol.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/protocol.sgml
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,9 @@ 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 fields
1863+
are labeled as <type>text</type>, they effectively return raw bytes,
1864+
with no encoding conversion:
18631865
</para>
18641866

18651867
<para>
@@ -1877,7 +1879,7 @@ The commands accepted in replication mode are:
18771879

18781880
<varlistentry>
18791881
<term>
1880-
<literal>content</literal> (<type>bytea</type>)
1882+
<literal>content</literal> (<type>text</type>)
18811883
</term>
18821884
<listitem>
18831885
<para>

‎src/backend/replication/walsender.c

Copy file name to clipboardExpand all lines: src/backend/replication/walsender.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ SendTimeLineHistory(TimeLineHistoryCmd *cmd)
496496
pq_sendstring(&buf, "content"); /* col name */
497497
pq_sendint32(&buf, 0); /* table oid */
498498
pq_sendint16(&buf, 0); /* attnum */
499-
pq_sendint32(&buf, BYTEAOID); /* type oid */
499+
pq_sendint32(&buf, TEXTOID); /* type oid */
500500
pq_sendint16(&buf, -1); /* typlen */
501501
pq_sendint32(&buf, 0); /* typmod */
502502
pq_sendint16(&buf, 0); /* format code */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.