Minor documentation error regarding streaming replication protocol

Поиск
Список
Период
Сортировка
От Brar Piening
Тема Minor documentation error regarding streaming replication protocol
Дата
Msg-id 6a1b9cd9-17e3-df67-be55-86102af6bdf5@gmx.de
обсуждение исходный текст
Ответы Re: Minor documentation error regarding streaming replication protocol
Re: Minor documentation error regarding streaming replication protocol
Список pgsql-hackers
While implementing streaming replication client functionality for Npgsql
I stumbled upon a minor documentation error at
https://www.postgresql.org/docs/current/protocol-replication.html

The "content" return value for the TIMELINE_HISTORYcommand is advertised
as bytea while it is in fact raw ASCII bytes.

How did I find out?
Since the value I get doesn't start with a "\x" and contains ascii text,
although I've bytea_outputset to hex, I first thought that the streaming
replication protocol simply doesn't honor bytea_output, but then I
realized that I also get unencoded tabs and newlines which wouldn't be
possible if the value woud be passed through byteaout.

This is certainly a minor problem since the timeline history file only
contains generated strings that are ASCII-only, so just using the
unencoded bytes is actually easier than decoding bytea.
OTOH it did cost me a few hours (writing a bytea decoder and figuring
out why it doesn't work by looking at varlena.c and proving the docs
wrong) so I want to point this out here since it is possibly an
unintended behavior or at least a documentation error.
Also I'm wary of taking dependency on an undocumented implementation
detail that could possibly change at any point.

Regards,
Brar




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Gripes about walsender command processing
Следующее
От: Brar Piening
Дата:
Сообщение: Re: Minor documentation error regarding streaming replication protocol