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 1uY67e-0012qp-Uj for pgsql-general@arkaria.postgresql.org; Sat, 05 Jul 2025 16:52:19 +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 1uY67c-007rfn-0w for pgsql-general@arkaria.postgresql.org; Sat, 05 Jul 2025 16:52:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uY67b-007rfZ-MG for pgsql-general@lists.postgresql.org; Sat, 05 Jul 2025 16:52:16 +0000 Received: from mail42.out.titan.email ([209.209.25.43]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uY67W-005v9I-2D for pgsql-general@lists.postgresql.org; Sat, 05 Jul 2025 16:52:13 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp-out.flockmail.com (Postfix) with ESMTP id 5630CE0032; Sat, 5 Jul 2025 16:52:08 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=7dZXT3kT2XOvmyMDoLDfCzM5Zo/+EbMEn7HwYKHrTqI=; c=relaxed/relaxed; d=pfortin.com; h=date:to:message-id:subject:from:mime-version:from:to:subject:date:message-id:cc:in-reply-to:reply-to:references; q=dns/txt; s=titan1; t=1751734328; v=1; b=JfgCwCphfldLo7Zitj9LnZXAqYngEeFFuSa7kpvnd5GYTTPIIBY4ERPeYD1KY56E4Ow+VV96 m8J61F/1sP+Hr6uGmkvB+YZvyMQjWwikRqWybLtEaDmxqqPTBrk7wYA6eLYkSlNJ3VdzHArqvxd uM0P9Q5t2Ln4ir5f638Bq+Q8= Received: from pfortin.com (h194.51.155.207.dynamic.ip.windstream.net [207.155.51.194]) by smtp-out.flockmail.com (Postfix) with ESMTPA id F0357E000B; Sat, 5 Jul 2025 16:52:07 +0000 (UTC) Date: Sat, 5 Jul 2025 12:52:07 -0400 Feedback-ID: :pf@pfortin.com:pfortin.com:flockmailId From: Pierre Fortin To: pgsql-general@lists.postgresql.org Subject: pg_upgrade: can I use same binary for old & new? Message-ID: <20250705125207.31b4d475@pfortin.com> X-Mailer: Claws Mail 4.3.1git142 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-F-Verdict: SPFVALID X-Titan-Src-Out: 1751734328170940899.26132.1992175697885550358@prod-use1-smtp-out1004. X-CMAE-Score: 0 X-CMAE-Analysis: v=2.4 cv=QtKk3Uyd c=1 sm=1 tr=0 ts=68695838 a=qh1+orYxbfpu+9ysfXJjVg==:117 a=qh1+orYxbfpu+9ysfXJjVg==:17 a=kj9zAlcOel0A:10 a=CEWIc4RMnpUA:10 a=V1M8Njz4AAAA:8 a=epTmVMiNAAAA:8 a=DD1FLYG15bKv0mzdyYsA:9 a=CjuIK1q_8ugA:10 a=n6hkdgs9fqAA:10 a=FcKBESGghfQA:10 a=HupH6vDiPdoo5NHHcIeY:22 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, [Hope this gets through after dumping DKIM-ignorant mail provider.] Wanting to upgrade from: PostgreSQL 15.13 on x86_64-mageia-linux-gnu, compiled by gcc (Mageia 15.1.0-1.mga10) 15.1.0, 64-bit to: PG 17.5 Way back, I was able to use -k|--link option on pg_upgrade (PG13 to PG15); but since then: - my DB has grown to over 8TB - even with ~70TB, I don't have enough contiguous disk space to dump/restore - my Linux distro (Mageia) is not setup to handle multiple versions of postgres (installing 17.5 removes 15.13). Worse, it failed to install part of the module when it saw /var/lib/pgsql/data still there: https://bugs.mageia.org/show_bug.cgi?id=34306 I've glanced at the pg_upgrade source code (my C skills are ancient) and it appears pg_upgrade is virtually the same from 15.13 to 17.5. My question: did I miss anything, or would: $ pg_upgrade -d data15 -D data17 -k suffice? Besides not noticing significant difference between the two versions, the docs at https://www.postgresql.org/docs/current/pgupgrade.html contain: "default is the directory where pg_upgrade resides" If new pg_upgrade is the only binary, will both -b and -B default to it? Maybe at minimum I may need to specify: $ pg_upgrade -b /usr/bin -d data15 -D data17 -k ? Thanks, Pierre