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.96) (envelope-from ) id 1wZu4n-001OB4-1T for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jun 2026 17:29:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wZu4l-006xUE-0c for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jun 2026 17:29:19 +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.96) (envelope-from ) id 1wZu4k-006xU4-2u for pgsql-hackers@lists.postgresql.org; Wed, 17 Jun 2026 17:29:18 +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.98.2) (envelope-from ) id 1wZu4f-00000000x8Q-0KYY for pgsql-hackers@lists.postgresql.org; Wed, 17 Jun 2026 17:29:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 65HHT9r81131493; Wed, 17 Jun 2026 13:29:09 -0400 From: Tom Lane To: Baji Shaik cc: pgsql-hackers@lists.postgresql.org, Bruce Momjian Subject: Re: [PATCH] Doc: document standard_conforming_strings dump/restore incompatibility In-reply-to: References: Comments: In-reply-to Baji Shaik message dated "Mon, 11 May 2026 17:21:57 -0500" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <1131479.1781717330.0@sss.pgh.pa.us> Date: Wed, 17 Jun 2026 13:29:09 -0400 Message-ID: <1131492.1781717349@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1131479.1781717330.1@sss.pgh.pa.us> Baji Shaik writes: > Commit 45762084 [1] forced standard_conforming_strings to always be ON in > PostgreSQL 19. The release notes mention this change, but neither the > pg_dump/pg_restore reference pages nor the migration section note the > implications for restoring older dump files. Okay, that's an oversight in the release notes for sure. I'm more skeptical about putting such information into the application reference pages though. It seems of only transient interest, but any text we put there is likely to survive for many years. Independently of that... > The attached patch adds notes to: > - pg_dump reference page (Notes section) > - pg_restore reference page (Notes section) > - release-19 migration section I don't like this patch, because it presents much too rosy a view of whether you can get away with not re-taking the dump. It's unsafe even with COPY-format data, because string literals in views, table default expressions and constraints, function definitions, etc are all at hazard of being misinterpreted. I think we should just say it won't work correctly, full stop. I'm inclined to do more or less the attached, which also fixes what seems a thinko in the existing text: we should say that clients still support standard_conforming_strings = off, not escape_string_warning = off. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="v2-document-dump-restore-hazard.patch"; charset="us-ascii" Content-ID: <1131479.1781717330.2@sss.pgh.pa.us> Content-Description: v2-document-dump-restore-hazard.patch Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/release-19.sgml b/doc/src/sgml/release-19.sgml index 285bfa123f6..4943885cf01 100644 --- a/doc/src/sgml/release-19.sgml +++ b/doc/src/sgml/release-19.sgml @@ -109,7 +109,18 @@ Force standard_conformi = -Server variable escape_string_warning has been removed= as unnecessary. Client applications still support escape_string= _warning =3D off for compatibility with old servers. +This carries some risk for upgrades: a dump file produced by +pre-v19 pg_dump from a server that +had standard_conforming_strings =3D off +will not restore correctly into v19 or later. Use +v19 pg_dump to take the dump, or +set standard_conforming_strings =3D on +in the old server before dumping. +Client applications still support operations with servers +having standard_conforming_strings =3D off, for +compatibility with old servers. +Server variable escape_string_warning has been removed +as unnecessary. = ------- =_aaaaaaaaaa0--