Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Sadhuprasad Patro <b(dot)sadhu(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber
Date: 2021-10-22 16:55:02
Message-ID: 2719165.1634921702@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Japin Li <japinli(at)hotmail(dot)com> writes:
> Attach v5 patch. This patch set the datestyle, intervalstyle and
> extra_float_digits parameters when we connect to publisher, this can
> avoid the network round trips (compare with the first patch).

You could make it a little less confusing by not insisting on a
space in the datestyle. This should work fine:

vals[i] = "-c datestyle=ISO,YMD -c intervalstyle=postgres extra_float_digits=3";

Also, I think some comments would be appropriate.

I don't see any value whatsoever in the more complicated version
of the patch. It's just more code to maintain and more things
to go wrong. And not only at our level, but the DBA's too.
What if the subscriber and publisher are of different PG versions
and have different ideas of the valid values of these settings?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bossart, Nathan 2021-10-22 16:58:18 Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?
Previous Message Japin Li 2021-10-22 16:40:42 Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber