Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber - Mailing list pgsql-hackers

From Japin Li
Subject Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber
Date
Msg-id SYYP282MB167804C731BECFC32F38893CB6BE9@SYYP282MB1678.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
On Mon, 18 Oct 2021 at 17:27, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> On Mon, Oct 18, 2021 at 1:41 PM Japin Li <japinli@hotmail.com> wrote:
>
>> I attached v3 patch that set IntervalStyle to 'postgres' when the
>> server backend is walsender, and this problem has gone.
>
>> I test that set IntervalStyle to 'sql_standard' on publisher and
>> 'iso_8601' on subscriber, it works fine.
>
>> Please try v3 patch and let me know if they work as unexpected.
>> Thanks in advance.
>
> I think the idea of setting the standard DateStyle and the
> IntervalStyle on the walsender process looks fine to me.  As this will
> avoid extra network round trips as Tom mentioned.

After some test, I find we also should set the extra_float_digits to avoid
precision lossing.

Please consider the v4 patch to review.

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.


Attachment

pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: lastOverflowedXid does not handle transaction ID wraparound
Next
From: Amit Kapila
Date:
Subject: Re: Question about building an exportable snapshop