Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsGS1-005vT1-R2 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2024 06:19:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rsGRz-00G4CC-Ni for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2024 06:19:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsGRz-00G4C3-EE for pgsql-hackers@lists.postgresql.org; Thu, 04 Apr 2024 06:19:51 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsGRv-000YFY-8h for pgsql-hackers@lists.postgresql.org; Thu, 04 Apr 2024 06:19:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 4346Jjtf465249 for ; Thu, 4 Apr 2024 02:19:45 -0400 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: postgres_fdw fails because GMT != UTC MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <465247.1712211585.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 04 Apr 2024 02:19:45 -0400 Message-ID: <465248.1712211585@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Over at [1] we have a complaint of postgres_fdw failing with a remote-server error > 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. Thoughts? regards, tom lane [1] https://www.postgresql.org/message-id/flat/5DF49366-10D1-42A4-99BF-F9A= 7DC3AB0F4%40mailbox.org