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 1pH9mq-0007BW-D4 for pgsql-general@arkaria.postgresql.org; Sun, 15 Jan 2023 20:39:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pH9mp-00082i-9S for pgsql-general@arkaria.postgresql.org; Sun, 15 Jan 2023 20:39:27 +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 1pH9mo-00082Y-J8 for pgsql-general@lists.postgresql.org; Sun, 15 Jan 2023 20:39:26 +0000 Received: from rs6162.luxsci.com ([162.142.76.255]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pH9ml-0005wZ-Kp for pgsql-general@lists.postgresql.org; Sun, 15 Jan 2023 20:39:25 +0000 Received: from pfortin.com (h163.145.185.173.dynamic.ip.windstream.net [173.185.145.163]) (authenticated bits=0) by rs6162.luxsci.com (8.15.2/8.14.9) with ESMTPSA id 30FKdJRw897886 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sun, 15 Jan 2023 20:39:19 GMT Date: Sun, 15 Jan 2023 15:39:19 -0500 From: pf@pfortin.com To: pgsql-general@lists.postgresql.org Subject: Re: pg_upgrade 13.6 to 15.1? Message-ID: <20230115153919.6d21ea50@pfortin.com> In-Reply-To: <1650559.1673812055@sss.pgh.pa.us> References: <20230115142732.0ec38e2a.pfortin@pfortin.com> <1650559.1673812055@sss.pgh.pa.us> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Lux-Comment: Message 30FKdJRw897886 sent by user #22429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pfortin.com; h=date:from:to:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=dkim; bh=eSEJBrCbXwjkR24wkm12HcOHwnoK0/EtL864ePoxnSQ=; b=EUEiavuFO/Xl8pUN9mio/c8gQ2hxJLT9yQAnzp6wGnRZyRwZq5wFiuUmOjZhxv6RX65e4hk6REHUg3yxXOlw/cH/9OVK0imdSageeQR3Lv/RviRk/Jm4CcjGou3DzXWhcuTx81sxNCRqfNiDDne429T2rjaSphqwA3Sql9pilRg= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 15 Jan 2023 14:47:35 -0500 Tom Lane wrote: >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). 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 copy time? I have an identical copy of the DB, so could recover if necessary or just go the initdb route. I wasn't clear on the exact syntax for including --link... if that's an option I can use, do I eliminate one of the -d or -D parameters? Thanks! > regards, tom lane