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

From: Alain Bourgeois <alain(dot)bourgeois(at)zetes(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "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 09:24:50
Message-ID: PAXP191MB1712B2F0354E98E4396CC739F09D2@PAXP191MB1712.EURP191.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Here is what can be said about config (no extension, nothing special)
There are already one postgresql-15 services (separate cluster, on ports <>5432) that run on this machine, and there is also one postgres 10 cluster (on port 5432).
The aim is to update the 10 to 15 to get rid of v10.
So we created a new psql 15 cluster.

/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'

The new psql-15 cluster,/usr/lib/systemd/system/postgresql-15-bc.service, has PGDATA=/mnt/pgdata/pgdirbc15/

Initdb has been run on /mnt/pgdata/pgdirbc15/, postgresql.conf holds data_directory = '/mnt/pgdata/pgdirbc15/', hba_file = '/mnt/pgdata/pgdirbc15/pg_hba.conf'
pg_hba.conf has been copied from psql10 data dir
postgresql.conf has been adapted to match the v10 one: listen_addresses = '*', port=5455, max_connections=150, password_encryption = md5, ssl=on (certificates have been copied from previous cluster to new one), wal_level=replica. I left archive_mode=off on new server although it is on on the old one.
For new cluster postgresql.conf is in PGDATA directory (which is not the case of the old one).
systemctl start postgresql-15-bc works without any problem. It has been stopped before pg_upgrade --check.

Postgres 10 cannot be stopped, it is a live prod system.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Oleg Sibiryakov 2024-09-05 09:33:49 Documentation improvement patch
Previous Message Kirk Parker 2024-09-05 02:46:35 Re: Behavior of ON DELETE CASCADE in CTEs