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 1sqXYf-00Aagb-Hf for pgsql-general@arkaria.postgresql.org; Tue, 17 Sep 2024 12:43: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 1sqXYe-00ALu7-IZ for pgsql-general@arkaria.postgresql.org; Tue, 17 Sep 2024 12:43:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sqXYd-00ALtz-U6 for pgsql-general@lists.postgresql.org; Tue, 17 Sep 2024 12:43:51 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sqXYa-001dmd-WE for pgsql-general@postgresql.org; Tue, 17 Sep 2024 12:43:50 +0000 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3e06853e579so2822983b6e.0 for ; Tue, 17 Sep 2024 05:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726577028; x=1727181828; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=WJgONhjpnjPNLMVtxsRHV+plU/I5oNspmsuSjhUO9/o=; b=ZhYJVd+HK/mWs69SZHL8FL/QpmC3hVc71YoJZJYBW7Du1e9LEotaug//6ig8Sya+rB 6KLWjUbnenj38GTZRCJ/FR/koj50tJ0rxNMGwCTuYYFszwzHXponx56NVAvRE+rsWZRc Di+X1x/in201INhzv6DTcugu+5VxAzT9Xbe+nw47jZtQZLECudntpDNeHFsIEONVkeCY Pwvo7YXfaynjcEpdV1d8OnGVr3VC9eyU19ABZbmdSKNNeuPed7yEbQorvHvCerIkagFa VHc+TwccMA7VvkY63Yy3EdfbiiBijkFhUkiPU0icbAGhRtkosoCaOlecpKS1yU2rWLQd Qvmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726577028; x=1727181828; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WJgONhjpnjPNLMVtxsRHV+plU/I5oNspmsuSjhUO9/o=; b=ND/hI5j0KY+sFbIydhkfZdGmjUvpx9UCJJKOrwnKWkccxNVC9Gss3KXgOyer5e4vJx 5Lkmky8evmLrZDQzkoXZqkta6ZxNjB2uRjsnWk6AXkzxzdlrqjUcUSHhg6EsMGJw/Fee nD5RRKKM7s56m4Qh5Y+lzAERGIkzCLspLGLTpLoJ/rVBfFWg8sz86o2X5ecXjn5YFz8P QzVaLNKF2MsusLr85q0aGbKzzV3+xHvbB11uObwoG4A7ZdKCT5J4NG3UvfRzPb9P5ivq OsBNvdvg+7wIrQLODU0vfQyaHVFymbL857yxgTzQTUEu19NPGZqEXLcAVzQjcOgvW2H2 9Lcw== X-Gm-Message-State: AOJu0YzZA3nJuoabzCo40PaIRL3fwbzNzBTiWnHRnjy5clLv5ZnCQG/j hO1q/wFifshZFB6jRfGw2UWxFaCmMQaedF9eHUZAQOqRZGrReSXQJbGzdpel1qOsSFj1rogyv0q yzW43AGJviZ8P/vU3BvIb8SxrFxjfMw== X-Google-Smtp-Source: AGHT+IHtV1/vk8P1DccnumyaEyePC/2ecHalsKd3/5W/ZsLvxIc6nIbO+CxbzAKT83/CWsIYc7bCKR0aEtSMGCXLiEQ= X-Received: by 2002:a05:6808:1814:b0:3e0:4d7f:ef73 with SMTP id 5614622812f47-3e071ae361bmr11838307b6e.37.1726577027968; Tue, 17 Sep 2024 05:43:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Tue, 17 Sep 2024 08:43:36 -0400 Message-ID: Subject: Re: question on plain pg_dump file usage To: PG-General Mailing List Content-Type: multipart/alternative; boundary="0000000000006dfd150622500ac7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006dfd150622500ac7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 17, 2024 at 8:22=E2=80=AFAM Zwettler Markus (OIZ) < Markus.Zwettler@zuerich.ch> wrote: > I have to do an out-of-place Postgres migration from PG12 to PG16 using: > > > > pg_dump -F p -f dump.sql =E2=80=A6 > > sed -i "s/old_name/new_name/g" > > psql -f dump.sql =E2=80=A6 > > > > 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. > > Why must it be a plain text dump instead of a custom or directory dump? Restoring to a new (and differently-named( database is perfectly doable. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. crustacean! --0000000000006dfd150622500ac7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Sep 17, 2024 at 8:22=E2=80=AFAM Z= wettler Markus (OIZ) <Mark= us.Zwettler@zuerich.ch> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">

I have= to do an out-of-place Postgres migration from PG12 to PG16 using:

=C2=A0

pg_dum= p -F p -f dump.sql =E2=80=A6

sed -i= "s/old_name/new_name/g"

psql -= f dump.sql =E2=80=A6

=C2=A0

Both d= atabases are on UTF-8.

=C2=A0

I wond= er if there could be character set conversion errors here, as the data is t= emporarily written to a plain text file.


Why must it= be a plain text dump instead of a custom or directory dump?=C2=A0 Restorin= g to a new (and differently-named(=C2=A0database is perfectly doable.

--
Death to &= lt;Redacted>, and butter sauce.
Don't boil me, I'm still ali= ve.
<Redacted> crustacean!
=
--0000000000006dfd150622500ac7--