Re: postgres_fdw fails because GMT != UTC

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: postgres_fdw fails because GMT != UTC
Date: 2024-04-10 11:30:59
Message-ID: CAPmGK14WwfHhmHKbPiM0uU-vo4ifMNrM4cPAj9ZMeyKhCkSPYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 4, 2024 at 3:49 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> On Thu, 2024-04-04 at 02:19 -0400, Tom Lane wrote:
> > > ERROR: invalid value for parameter "TimeZone": "UTC"
> >
> > I am not quite clear on how broken an installation needs to be to
> > reject "UTC" as a time zone setting, except that the breakage cannot
> > be subtle. However, I notice that our code in pgtz.c and other
> > places treats "GMT" as a hard-wired special case ... but not "UTC".
> > I wonder if we ought to modify those places to force "UTC" down the
> > same hard-wired paths. If we acted like that, this would have worked
> > no matter how misconfigured the installation was.
> >
> > An alternative answer could be to change postgres_fdw to send "GMT"
> > not "UTC". That's ugly from a standards-compliance viewpoint, but
> > it would fix this problem even with a non-updated remote server,
> > and I think postgres_fdw is generally intended to work with even
> > very old remote servers.
> >
> > Or we could do both.
>
> I think the first is desirable for reasons of general sanity, and the
> second for best compatibility with old versions.
>
> So I vote for "both".

+1 for both (assuming that the latter does not make the postgres_fdw
code complicated).

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2024-04-10 11:32:21 Revise some error messages in split partition code
Previous Message Amit Kapila 2024-04-10 11:18:26 Re: Slow catchup of 2PC (twophase) transactions on replica in LR