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.96) (envelope-from ) id 1x6DlB-0006aC-2j for pgsql-general@arkaria.postgresql.org; Mon, 14 Sep 2026 20:58:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x6Dl9-00FZEp-2s for pgsql-general@arkaria.postgresql.org; Mon, 14 Sep 2026 20:58:39 +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.96) (envelope-from ) id 1x6Dl8-00FZEg-2M for pgsql-general@lists.postgresql.org; Mon, 14 Sep 2026 20:58:39 +0000 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x6Dl6-0000000054N-3RU1 for pgsql-general@postgresql.org; Mon, 14 Sep 2026 20:58:37 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 64D2F1D000F6; Mon, 14 Sep 2026 16:58:35 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Mon, 14 Sep 2026 16:58:35 -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=fm3; t=1789419515; x=1789505915; bh=WXjw3iMLk7MBY5TI8LHJKKvZcIomsmdBk+2a0ElD6RQ=; b= qhjB6k62VRFo3/EJCY6aoS9zceYJb2ink05e87sG3myAn936Z0wP3vI0FH++owRA ONW3e+4boTBc15Iw97YpDPs5AOvogymfZlRNn5v8h+CTCJGN9YzsuxgsNkRGK5iM KKulWMei2uCQx/6MgAgDtEqv5jAnFG94rDCq8dl/n0o78GbVbVfuelK8/tb6XFf+ uhmZ8eWY9mQ0l84hb5iUvD6xqhkwFEPVI/yLcoiuNYxmMXoGePJRpRhbrnay4J1C 2C5lYekE/jZaoo3Cm3Qtz8GcalBnLKRvE+ptvUJ867fDB/n64f6/ug2zevJY95sM jyOT+cEcoCYqShWQ8xZ3lw== 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=fm1; t=1789419515; x=1789505915; bh=W Xjw3iMLk7MBY5TI8LHJKKvZcIomsmdBk+2a0ElD6RQ=; b=lrmWoYPQgeelOAV6H LLV6C/KhqApdvpDuM5D/f2tLcU3mNn+rbBIfmVGxtB4KYKD+33mBkEU1MhS9sin3 6Snlcuc6ygD7r3urq4VnYVWhYwG8V/aG/b8Hc/To0s1tbQ5NWx0JzHazAX6E3u6h eVIPYVrzxKPLIySFhly/f3pAboaqKbqTeBM6NzfZsl8orHZdz2IAweh/GuC9RxE1 Y6rq+Wisv7A8EKOAi+fGNUSvAfiouZ49AADTbNvshnnC+yTIeHE7+VfmH98dUzS1 DvC3zeO/Tonr6gFCYGFgXios1QiTixi9EXWbaI/lLdFFipOJZUutNxVRDZbpMMcW avoyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEf01Usw6ptNiZSOzUYX70/IxLXQTaug7W4WF+8/7RlYgnriqeo3pcAGLA489NX3O 0GANLeR7x5TMb2WX/ozZWsxT7ZQlnZw0Ll7b74xWUDIiUPazJvgzylhoTy6l6RreIGcy7O qiNUS18Vo6hDteqSGbJerTpahTJR/tD8wCovy7xwfw+N+5PSunJ+Fd2hmvY9SOENSlvIuW 8qp8IXBLKLpy/AoqfORQCW0nF/+aqkgsCoFDXQ/EQ02OO7GDyWtbPBir5hORcQiAOllHdg +QrYaurRlXWamnxQ4RdncwA5hAOHFXwv7hpQ0eJDn6yxZgUgkgp2NZGGw9p0GH2fI6qHMl 6n9QpY2t+sydTP02fNHN1G+CY5TCJDRO3PRZ43tdtbSlqP2Qwtv0IsESFPjUW268TI6naO yhTObzJh3hixjLOIcDEXla4ANy/Ou7b7hhV4RSw9rcsEOYXo+uOsf07MEm8Ait7KIaGz+t fpz8AKlWhCISm8dvFORUvTZ9Wfm27jd5NpZDPJZUk6Q8s204oMVtNEmzgU7q6XxBgdjc1S anVpwHbUdoGxaeScEbQO0O5kMyGyoZkAG2rahoM+0mcfgN24PE4I+l6sO88JO2nyRgUYsz 5/SQSV4ibKkPDJpA3pg6ftFo1AAeW46qDJUxBTQ67liF5ad4kv+kHuQXRlmw X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Sep 2026 16:58:34 -0400 (EDT) Message-ID: <61c3bb14-504c-46d6-a6e3-da6862e772cd@aklaver.com> Date: Mon, 14 Sep 2026 13:58:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Upgrading 6 versions between 2 systems To: Ron Johnson , pgsql-general References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/14/26 1:43 PM, Ron Johnson wrote: > On Mon, Sep 14, 2026 at 4:26 PM Rich Shepard > wrote: > > When I've upgraded postgres in the past on my server/workstation it's > usually been from one major version to the next. What I want to do > now is to > move from 12.7 (on an older OS linux version) to 18.6 (on the current > version.) > > I know that data formats can change with postgres version increases > so my > question is: can I use dumpall in the 12.7 version and move that to > the host > running 18.6 since the output is a text .sql file? > > > Yes.  Note, though, that a single .sql file is the /slow/ way to export/ > import a database, especially if it's of any size. It's not and the below is overkill for Rich's purpose. > > Multithreaded export import is faster.  Something like this is what I'd do: > > Current system: > cd /path/to/backups > pg_dumpall --globals-only > globals_127.sql > Zlvl="--compress=zstd" > Threads=4 # or whatever > for db in x, y, z; do > pg_dump -p5432 -Fd $Zlvl -v --jobs=$Threads -f $db $db > done > > New system: > cd /path/to/backups > psql -af globals_127.sql > Zlvl="--compress=zstd" > Threads=4 # or whatever > for db in x, y, z; do > ${pg18}/pg_restore -p5433 -v --jobs=$Threads --clean --create -Fd -d > postgres $db > done > > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! -- Adrian Klaver adrian.klaver@aklaver.com