From: Tom Lane <tgl@sss.pgh.pa.us>
To: pf@pfortin.com
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_upgrade 13.6 to 15.1?
Date: Sun, 15 Jan 2023 15:59:20 -0500
Message-ID: <1693377.1673816360@sss.pgh.pa.us> (raw)
In-Reply-To: <20230115153919.6d21ea50@pfortin.com>
References: <20230115142732.0ec38e2a.pfortin@pfortin.com>
<1650559.1673812055@sss.pgh.pa.us>
<20230115153919.6d21ea50@pfortin.com>
pf@pfortin.com writes:
> On Sun, 15 Jan 2023 14:47:35 -0500 Tom Lane wrote:
>> I think you misunderstand how this is supposed to work. The -D
>> argument should point at an *empty* data directory that has been
>> freshly initialized with the new version's initdb. pg_upgrade then
>> transfers data into that from the old database (-d argument).
> I was hoping to avoid the hours worth of copying to the NVMe SSD.
> The instructions refer to upgrading with --link; would that save the copy
> time?
Yes, but to use --link you must have both data directories on the
same filesystem, so this is still the wrong thing.
Try something like
mv /mnt/work/var/lib/pgsql/data /mnt/work/var/lib/pgsql/data13
initdb /mnt/work/var/lib/pgsql/data
pg_upgrade ... -d /mnt/work/var/lib/pgsql/data13 -D /mnt/work/var/lib/pgsql/data --link ...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, pf@pfortin.com
Subject: Re: pg_upgrade 13.6 to 15.1?
In-Reply-To: <1693377.1673816360@sss.pgh.pa.us>
References: <20230115142732.0ec38e2a.pfortin@pfortin.com> <1650559.1673812055@sss.pgh.pa.us> <20230115153919.6d21ea50@pfortin.com> <1693377.1673816360@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox