Re: pg_upgrade -c cannot be run if old cluster is running

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alain Bourgeois <alain(dot)bourgeois(at)zetes(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade -c cannot be run if old cluster is running
Date: 2024-09-05 13:41:10
Message-ID: 50F065CA-6700-4C86-997D-1DC71D50C791@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

> On 5 Sep 2024, at 15:39, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Alain Bourgeois <alain(dot)bourgeois(at)zetes(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2024-09-05 14:57:04 Re: pg_upgrade -c cannot be run if old cluster is running
Previous Message Tom Lane 2024-09-05 13:39:02 Re: pg_upgrade -c cannot be run if old cluster is running