Re: pg_upgrade -c cannot be run if old cluster is running - Mailing list pgsql-docs

From Daniel Gustafsson
Subject Re: pg_upgrade -c cannot be run if old cluster is running
Date
Msg-id 50F065CA-6700-4C86-997D-1DC71D50C791@yesql.se
Whole thread Raw
In response to Re: pg_upgrade -c cannot be run if old cluster is running  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
> On 5 Sep 2024, at 15:39, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Alain Bourgeois <alain.bourgeois@zetes.com> writes:
>> /usr/lib/systemd/system/postgresql-10.service has PGDATA=/var/lib/pgsql/10/data/,
/var/lib/pgsql/10/data/postgtresql.confholds 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




pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_upgrade -c cannot be run if old cluster is running
Next
From: Tom Lane
Date:
Subject: Re: pg_upgrade -c cannot be run if old cluster is running