Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHA6B-0000Db-Mx for pgsql-general@arkaria.postgresql.org; Sun, 15 Jan 2023 20:59:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHA69-0003Ih-Sn for pgsql-general@arkaria.postgresql.org; Sun, 15 Jan 2023 20:59:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHA69-0003IY-IQ for pgsql-general@lists.postgresql.org; Sun, 15 Jan 2023 20:59:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHA66-0006E7-39 for pgsql-general@lists.postgresql.org; Sun, 15 Jan 2023 20:59:25 +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 30FKxKS61693378; Sun, 15 Jan 2023 15:59:20 -0500 From: Tom Lane To: pf@pfortin.com cc: pgsql-general@lists.postgresql.org Subject: Re: pg_upgrade 13.6 to 15.1? In-reply-to: <20230115153919.6d21ea50@pfortin.com> References: <20230115142732.0ec38e2a.pfortin@pfortin.com> <1650559.1673812055@sss.pgh.pa.us> <20230115153919.6d21ea50@pfortin.com> Comments: In-reply-to pf@pfortin.com message dated "Sun, 15 Jan 2023 15:39:19 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1693376.1673816360.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 15 Jan 2023 15:59:20 -0500 Message-ID: <1693377.1673816360@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk pf@pfortin.com writes: > On Sun, 15 Jan 2023 14:47:35 -0500 Tom Lane wrote: >> I think you misunderstand how this is supposed to work. The -D >> argument should point at an *empty* data directory that has been >> freshly initialized with the new version's initdb. pg_upgrade then >> transfers data into that from the old database (-d argument). > I was hoping to avoid the hours worth of copying to the NVMe SSD. = > The instructions refer to upgrading with --link; would that save the cop= y > time? Yes, but to use --link you must have both data directories on the same filesystem, so this is still the wrong thing. Try something like mv /mnt/work/var/lib/pgsql/data /mnt/work/var/lib/pgsql/data13 initdb /mnt/work/var/lib/pgsql/data pg_upgrade ... -d /mnt/work/var/lib/pgsql/data13 -D /mnt/work/var/lib/= pgsql/data --link ... regards, tom lane