pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Alain Bourgeois <alain.bourgeois@zetes.com>
Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: pg_upgrade -c cannot be run if old cluster is running
Date: Thu, 05 Sep 2024 11:13:18 -0400
Message-ID: <1847617.1725549198@sss.pgh.pa.us> (raw)
In-Reply-To: <PAXP191MB17129FAD70A7022C31AA4EEBF09D2@PAXP191MB1712.EURP191.PROD.OUTLOOK.COM>
References: <172546462173.8361.7114078895863039790@wrigleys.postgresql.org>
<1692842.1725482754@sss.pgh.pa.us>
<PAXP191MB1712B2F0354E98E4396CC739F09D2@PAXP191MB1712.EURP191.PROD.OUTLOOK.COM>
<1827652.1725543542@sss.pgh.pa.us>
<PAXP191MB171215979D903A2BDF4E207BF09D2@PAXP191MB1712.EURP191.PROD.OUTLOOK.COM>
<PAXP191MB17125C74331DB9BCE8CF5DFDF09D2@PAXP191MB1712.EURP191.PROD.OUTLOOK.COM>
<1845283.1725548224@sss.pgh.pa.us>
<PAXP191MB17129FAD70A7022C31AA4EEBF09D2@PAXP191MB1712.EURP191.PROD.OUTLOOK.COM>
Alain Bourgeois <alain.bourgeois@zetes.com> writes:
> When the cluster was created, we did initdb /var/lib/pgsql10/data, the storagebox was not available.
> Then storagebox was delivered, we copied data folder to storagebox in /mnt/pgdata/pgdir and changed postgresql.conf. We didn't delete existing datafiles from /var/lib/pgsql10/data (db was empty).
Yeah, after further experimentation I saw that pg_upgrade would fail
in a pretty obvious way unless the supposedly-config-only directory
also contains a full set of subdirectories (base, pg_wal, etc).
We could imagine removing that check for PG_VERSION. I don't think
that the ensuing call of "postgres -C data_directory" would add
anything meaningful to pg_upgrade's runtime. But then you'd see
"Finding the real data directory" every time, indeed twice (for
source and target directories). That seems like it would create
more confusion than is justified.
On the whole I think this is self-inflicted damage. Leaving that
stuff around was just asking for confusion.
regards, tom lane
view thread (9+ messages)
Message-ID: <1847617.1725549198@sss.pgh.pa.us>
Permalink: ../1847617.1725549198@sss.pgh.pa.us/
Also on: postgresql.org/message-id/1847617.1725549198@sss.pgh.pa.us
reply
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 using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alain.bourgeois@zetes.com, pgsql-docs@lists.postgresql.org
Subject: Re: pg_upgrade -c cannot be run if old cluster is running
In-Reply-To: <1847617.1725549198@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