pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Ensure consistent logical replication of datetime and float8 val
Date: Tue, 02 Nov 2021 18:28:59 +0000
Message-ID: <E1mhyWp-00015b-3E@gemulon.postgresql.org> (raw)

Ensure consistent logical replication of datetime and float8 values.

In walreceiver, set the publisher's relevant GUCs (datestyle,
intervalstyle, extra_float_digits) to the same values that pg_dump uses,
and for the same reason: we need the output to be read the same way
regardless of the receiver's settings.  Without this, it's possible
for subscribers to misinterpret transmitted values.

Although this is clearly a bug fix, it's not without downsides:
subscribers that are storing values into some other datatype, such as
text, could get different results than before, and perhaps be unhappy
about that.  Given the lack of previous complaints, it seems best
to change this only in HEAD, and to call it out as an incompatible
change in v15.

Japin Li, per report from Sadhuprasad Patro

Discussion: https://postgr.es/m/CAFF0-CF=D7pc6st-3A9f1JnOt0qmc+BcBPVzD6fLYisKyAjkGA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f3d4019da5d026f2c3fe5bd258becf6fbb6b4673

Modified Files
--------------
.../replication/libpqwalreceiver/libpqwalreceiver.c      | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)



Message-ID: <E1mhyWp-00015b-3E@gemulon.postgresql.org>
Permalink:  ../E1mhyWp-00015b-3E@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mhyWp-00015b-3E@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Ensure consistent logical replication of datetime and float8 val
  In-Reply-To: <E1mhyWp-00015b-3E@gemulon.postgresql.org>
  References: <E1mhyWp-00015b-3E@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox