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 1pHAXr-0002Sh-3t for pgsql-general@arkaria.postgresql.org; Sun, 15 Jan 2023 21:28:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHAXo-0000xH-JG for pgsql-general@arkaria.postgresql.org; Sun, 15 Jan 2023 21:28:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHAXo-0000x6-4l for pgsql-general@lists.postgresql.org; Sun, 15 Jan 2023 21:28:00 +0000 Received: from rs6162.luxsci.com ([162.142.76.255]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHAXh-0007xC-9F for pgsql-general@lists.postgresql.org; Sun, 15 Jan 2023 21:27:58 +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 30FLRpLY935666 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sun, 15 Jan 2023 21:27:51 GMT Date: Sun, 15 Jan 2023 16:27:50 -0500 From: pf@pfortin.com To: pgsql-general@lists.postgresql.org Subject: Re: pg_upgrade 13.6 to 15.1? Message-ID: <20230115162750.24141c47@pfortin.com> In-Reply-To: <0276c684-7091-08c0-5854-0899111a0b19@aklaver.com> References: <20230115142732.0ec38e2a.pfortin@pfortin.com> <9a8899f2-211f-ae2a-1071-c1567d7ae988@aklaver.com> <20230115154139.5a60b4dd@pfortin.com> <0276c684-7091-08c0-5854-0899111a0b19@aklaver.com> 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=UTF-8 Content-Transfer-Encoding: quoted-printable X-Lux-Comment: Message 30FLRpLY935666 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=QLPD7Uk9EJXeza5Em9cnlqQNudTAfta7gzaLitxgwg8=; b=kpZAgqKGZvVfKMAoalY2J/c0t+BywWgaHFjnzci01VLUmH3ibA2+/x4TMwA+JzCFHtLT+UELOXIDP0rb49dKiXH8R+SfurwSWvRYR2ClUBf8daQzw9DkL3hDnTuPaRc4KKUjdGeKfzzHMzJ5GavNwBIm9s4J2mJNzNjMlIP0Oo4= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 15 Jan 2023 13:00:58 -0800 Adrian Klaver wrote: >On 1/15/23 12:41, pf@pfortin.com wrote: >> On Sun, 15 Jan 2023 12:23:10 -0800 Adrian Klaver wrote: >> =20 >>> On 1/15/23 11:27, pf@pfortin.com wrote: =20 >>>> Hi, >>>> >>>> I'm fairly new to postgres; but have databases with about 2TB of data. >>>> >>>> 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/b= in \ >>>> -d /mnt/db/var/lib/pgsql/data -D /mnt/work/var/lib/pgsql/data \ >>>> -s /tmp -U postgres =20 >>> =20 >>>> Nothing I read implies the need to upgrade to 14.x first... Right? =20 >>> >>> In addition to Tom Lane's comments I would recommend reading this: >>> >>> https://www.postgresql.org/docs/current/pgupgrade.html >>> >>> multiple times. There is a lot going on there and it will take a couple >>> of reads at least to begin to understand it all. =20 >>=20 >> Yup... that's what I've been working from... See my reply to Tom re >> --link... =20 > >1) Working from and understanding are two different things. For instance=20 >further on in the docs there is: > >--clone > > Use efficient file cloning (also known as =E2=80=9Creflinks=E2=80=9D = on some=20 >systems) instead of copying files to the new cluster. This can result in=20 >near-instantaneous copying of the data files, giving the speed=20 >advantages of -k/--link while leaving the old cluster untouched. > > File cloning is only supported on some operating systems and file=20 >systems. If it is selected but not supported, the pg_upgrade run will=20 >error. At present, it is supported on Linux (kernel 4.5 or later) with=20 >Btrfs and XFS (on file systems created with reflink support), and on=20 ^^^^^^^^^^^^^ Unless there's an update to pg_upgrade that's still undocumented; this is not an option since like so many Linux users, my file system is ext4. >macOS with APFS. > >2) From the docs: > >Run pg_upgrade > >Always run the pg_upgrade binary of the new server, not the old one.=20 >pg_upgrade requires the specification of the old and new cluster's data=20 >and executable (bin) directories. You can also specify user and port=20 >values, and whether you want the data files linked or cloned instead of=20 >the default copy behavior. > > >3) Again, read the docs multiple times there is a lot to understand. Agreed. But they could be a little clearer... :) >> Thanks! >> =20 >>>> >>>> Thanks >>>> Pierre >>>> >>>> >>>> =20 >>> =20 >>=20 >> =20 >