Re: Minor documentation error regarding streaming replication protocol

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Brar Piening <brar(at)gmx(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Minor documentation error regarding streaming replication protocol
Date: 2020-10-09 03:17:59
Message-ID: 20201009031759.GA1459@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 9, 2020 at 08:52:50AM +0900, Michael Paquier wrote:
> On Thu, Oct 08, 2020 at 04:23:06PM -0400, Bruce Momjian wrote:
> > I have looked at this. It seems SendTimeLineHistory() is sending raw
> > bytes from the history file, with no encoding conversion, and
> > ReceiveXlogStream() is receiving it, again assuming it is just plain
> > text. I am not sure we really have an SQL data type where we do this.
> > BYTEA doesn't do encoding conversion, but does backslash procesing, and
> > TEXT does encoding conversion.
> >
> > I suppose we either have to document this as BYTEA with no backslash
> > processing, or TEXT with no encoding conversion --- I think I prefer the
> > later.
>
> As StartupXLOG() tells, The timeline history file can include as
> reason the recovery target name which may not be made just of ASCII
> characters as that's the value specified in pg_create_restore_point by
> the user, so bytea is correct, no?

Good point. The reporter was assuming the data would come to the client
in the bytea output format specified by the GUC, e.g. \x..., so that
doesn't happen either. As I said before, it is more raw bytes, but we
don't have an SQL data type for that.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message osumi.takamichi@fujitsu.com 2020-10-09 03:19:47 RE: extension patch of CREATE OR REPLACE TRIGGER
Previous Message Amit Kapila 2020-10-09 03:13:19 Re: Fix typos in reorderbuffer.c