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 1uY9Px-001sTF-MG for pgsql-general@arkaria.postgresql.org; Sat, 05 Jul 2025 20:23:25 +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 1uY9Pv-009xRS-Or for pgsql-general@arkaria.postgresql.org; Sat, 05 Jul 2025 20:23:24 +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 1uY9Pv-009xRJ-E5 for pgsql-general@lists.postgresql.org; Sat, 05 Jul 2025 20:23:24 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uY9Pt-005wkP-2W for pgsql-general@lists.postgresql.org; Sat, 05 Jul 2025 20:23:23 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id E23B81400144; Sat, 5 Jul 2025 16:23:19 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Sat, 05 Jul 2025 16:23:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1751746999; x=1751833399; bh=WbSFsff9mXZw05jcLv1sLcnAxIJSH+JwOqundfy2gUs=; b= Etqh+691AooLP1WnBAxMveO3KI9b3vf6uBlJjXLZwk9nefenOaKIfu1Wx8jcFKIr sQrwa0oc+y/EfCGaJ10uvRwHQGMc7nf47pJ/fgA9hRdMgJ6zQXc/4d9CfTWsTBZK zqzMvvNjfjAqji/qsEsZqkhHiz6z537u5Gqy2JY6dlW0TYdm6kpDcP544hDrdqJg QkQ1hgOYZbZ1vpxieIf5iIRRm3FEdAdvYZ3RqIt8vbyHX+kVxgNfxn7ctjy9DZvt n7NRTa9pfLYfzcddGdZAkKaVmnfDHVHHuAdR7Jmo2O5yZO87MFQORzlCWCT3Bu3Q awNrXeWJcZ/w/4XUzn8lrg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1751746999; x=1751833399; bh=W bSFsff9mXZw05jcLv1sLcnAxIJSH+JwOqundfy2gUs=; b=Ec279oLlUJ8wVFGem LckpVmMCtUpEFohviDEyLMH6eJ/b5wOlUAFEHnNCvJcbXflaIDJgbAvdMgn5fw0h Z/EOeJ59SSa6ugrKva+Pr9qdZONZryIZx7gID6EErwkvxXp0C9EtRKmeSqU9Ep7Z 9zaYGPL8Sei1ktEr9/BEzck7VbKCacAtLduDp3rzVK9S+yz3V6q3L1oDazDwW3zG HKhuSTZVUlcEUkFL9O1NOV9tGgPb+05oUBN1C05ZjJ43csr75dNXjv+FPolmROaC efV0f4aOa61tK8kx3PEr1eq/LYVnX1t3upobYoUq2wy0IqWrunMtAPATmw9SDrAs e2w4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddvieellecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeetughrihgrnhcu mfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqne cuggftrfgrthhtvghrnhepiedvhfeiheehgeeuieeljeeitedtjeehudegfeelkedvleek hedtgfeiffefkedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspghr tghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhfsehpfhhorh htihhnrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdr phhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 5 Jul 2025 16:23:18 -0400 (EDT) Message-ID: Date: Sat, 5 Jul 2025 13:23:18 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_upgrade: can I use same binary for old & new? To: Pierre Fortin , pgsql-general@lists.postgresql.org References: <20250705125207.31b4d475@pfortin.com> <20250705142416.06e99667@pfortin.com> <65041.1751740220@sss.pgh.pa.us> <20250705151928.3a9ea7b1@pfortin.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <20250705151928.3a9ea7b1@pfortin.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/5/25 12:19, Pierre Fortin wrote: > On Sat, 05 Jul 2025 14:30:20 -0400 Tom Lane wrote: > >> I'd say give it a try; be sure to use one of the pg_dump modes >> that compress the data. > > OK... I failed to mention I have several databases in this cluster; so > digging into pg_dumpall, I see: > --binary-upgrade > This option is for use by in-place upgrade utilities. Its use for > other purposes is not recommended or supported. The behavior of the > option may change in future releases without notice. > > pg_upgrade has --link option; but I'm puzzled by this option in a > dumpall/restore process. My imagination wonders if this alludes to a way > to do something like: > pg_dumpall --globals-only --roles-only --schema-only ... > Would restoring this be a way to update only the control structures? Big > assumption that the actual data remains untouched... > > Inquiring mind... :) > > Back to my upgrade issue... > All my DBs are static (only queries once loaded). Assuming the dumpall > file fits on one of my drives: > pg_dumpall -f /PG.backup -v If you really want to use pg_dumpall and get compression then something like: pg_dumpall -U postgres | gzip > pg_backup.gz Though this will take some time and really is probably better handled using: pg_dumpall -U postgres -g > pg_globals.sql and then: pg_dump -d -U -Fc -f .out for each database. This will use compression by default. Neither of these options will be as quick as doing pg_upgrade with --link. Though at this point you are boxed in by not being able to run multiple Postgres versions on one machine. > appears to be all I need? pg_dump has compression by default; but I don't > see compression with dumpall other than for TOAST. > > Thanks, You guys are awesome! > >> regards, tom lane > > -- Adrian Klaver adrian.klaver@aklaver.com