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 1pH8yj-0003IT-Kd for pgsql-general@arkaria.postgresql.org; Sun, 15 Jan 2023 19:47:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pH8yi-0001IU-A6 for pgsql-general@arkaria.postgresql.org; Sun, 15 Jan 2023 19:47:40 +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 1pH8yh-0001IL-Vy for pgsql-general@lists.postgresql.org; Sun, 15 Jan 2023 19:47:39 +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 1pH8yf-0005XJ-VV for pgsql-general@lists.postgresql.org; Sun, 15 Jan 2023 19:47:39 +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 30FJlZVw1650560; Sun, 15 Jan 2023 14:47:36 -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: <20230115142732.0ec38e2a.pfortin@pfortin.com> References: <20230115142732.0ec38e2a.pfortin@pfortin.com> Comments: In-reply-to pf@pfortin.com message dated "Sun, 15 Jan 2023 14:27:32 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1650558.1673812055.1@sss.pgh.pa.us> Date: Sun, 15 Jan 2023 14:47:35 -0500 Message-ID: <1650559.1673812055@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk pf@pfortin.com writes: > Trying to upgrade from 13.6 to 15.1, pg_upgrade complains with: > [postgres@pf ~]$ /usr/bin/pg_upgrade -b /usr/local/pgsql/bin -B /usr/bin \ > -d /mnt/db/var/lib/pgsql/data -D /mnt/work/var/lib/pgsql/data \ > -s /tmp -U postgres > This utility can only upgrade to PostgreSQL version 15. <=====<<< ?? This indicates that it thinks the new data directory (-D) is the wrong version. Perhaps the error message could be clearer about that. > Due to the database size, I have the working copy on a 4TB NVMe SSD > mounted at /mnt/work/var/lib/{pgadmin,pgsql} and an identical copy on an > 18TB platter at /mnt/db/var/lib/{pgadmin,pgsql}. Both copies are > currently at 13.6. 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). regards, tom lane