> On 5 Sep 2024, at 15:39, Tom Lane <t...@sss.pgh.pa.us> wrote: > > Alain Bourgeois <alain.bourge...@zetes.com> writes: >> /usr/lib/systemd/system/postgresql-10.service has >> PGDATA=/var/lib/pgsql/10/data/, /var/lib/pgsql/10/data/postgtresql.conf >> holds data_directory = '/mnt/pgdata/pgdir' > > This is probably the source of your problem. IIRC, pg_upgrade > needs to be pointed at the actual old data directory, not > PGDATA=/var/lib/pgsql/10/data.
Correct, pg_upgrade use the PGDATANEW and PGDATAOLD env variables for the cluster data directories. -- Daniel Gustafsson