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 1uY6Jw-0015cc-9B for pgsql-general@arkaria.postgresql.org; Sat, 05 Jul 2025 17:05:00 +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 1uY6Jt-0087JX-N2 for pgsql-general@arkaria.postgresql.org; Sat, 05 Jul 2025 17:04:58 +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 1uY6Jt-0087Gw-BO for pgsql-general@lists.postgresql.org; Sat, 05 Jul 2025 17:04:57 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uY6Js-005jxh-0i for pgsql-general@lists.postgresql.org; Sat, 05 Jul 2025 17:04:57 +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 565H4tRP007266; Sat, 5 Jul 2025 13:04:55 -0400 From: Tom Lane To: Pierre Fortin cc: pgsql-general@lists.postgresql.org Subject: Re: pg_upgrade: can I use same binary for old & new? In-reply-to: <20250705125207.31b4d475@pfortin.com> References: <20250705125207.31b4d475@pfortin.com> Comments: In-reply-to Pierre Fortin message dated "Sat, 05 Jul 2025 12:52:07 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7264.1751735095.1@sss.pgh.pa.us> Date: Sat, 05 Jul 2025 13:04:55 -0400 Message-ID: <7265.1751735095@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pierre Fortin writes: > - my Linux distro (Mageia) is not setup to handle multiple versions of > postgres (installing 17.5 removes 15.13). Ugh. You cannot do pg_upgrade without a copy of the old postgres server binary as well as the new one. pg_upgrade by itself is not capable of accessing either set of catalogs. Way back when I was packaging PG for Red Hat, they didn't support multiple concurrently-installed package versions either, so what I did was to provide an auxiliary pg_upgrade package that contained an old server binary as well as pg_upgrade itself. Perhaps Mageia has done something similar, or could be cajoled to once you point out that their packaging makes it impossible to do an upgrade. If that path yields no joy, you'll need to use a hand-built copy of one PG version or the other while performing the upgrade. Might want to think about migrating to some less PG-unfriendly distro while you are at it. regards, tom lane