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 1sqYmu-00AlYQ-I1 for pgsql-general@arkaria.postgresql.org; Tue, 17 Sep 2024 14:02:41 +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 1sqYmt-00BQ20-LO for pgsql-general@arkaria.postgresql.org; Tue, 17 Sep 2024 14:02:39 +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 1sqYmt-00BQ1r-BF for pgsql-general@lists.postgresql.org; Tue, 17 Sep 2024 14:02:39 +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 1sqYmp-001evI-JG for pgsql-general@postgresql.org; Tue, 17 Sep 2024 14:02:38 +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 48HE2Y691461556; Tue, 17 Sep 2024 10:02:34 -0400 From: Tom Lane To: "Zwettler Markus (OIZ)" cc: PG-General Mailing List Subject: Re: question on plain pg_dump file usage In-reply-to: References: Comments: In-reply-to "Zwettler Markus (OIZ)" message dated "Tue, 17 Sep 2024 12:22:14 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1461554.1726581754.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 17 Sep 2024 10:02:34 -0400 Message-ID: <1461555.1726581754@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Zwettler Markus (OIZ)" writes: > I have to do an out-of-place Postgres migration from PG12 to PG16 using: > pg_dump -F p -f dump.sql ... > sed -i "s/old_name/new_name/g" > psql -f dump.sql ... > Both databases are on UTF-8. > I wonder if there could be character set conversion errors here, as the = data is temporarily written to a plain text file. The dump script will include a "SET client_encoding" command to prevent that. regards, tom lane