The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/15/pgupgrade.html
Description:

https://www.postgresql.org/docs/15/pgupgrade.html tells
"You can use pg_upgrade --check to perform only the checks, even if the old
server is still running."
I tried (upgrade from postgres 10 to postgres 15):
/usr/pgsql-15/bin/pg_upgrade -b /usr/pgsql-10/bin/ -B /usr/pgsql-15/bin -d 
/var/lib/pgsql/10/data  -D /mnt/pgdata/pgdirbc15/ --link -c
Log tells:
-----------------------------------------------------------------
  pg_upgrade run on Wed Sep  4 09:08:31 2024
-----------------------------------------------------------------

command: "/usr/pgsql-10/bin/pg_ctl" -w -l
"/mnt/pgdata/pgdirbc15/pg_upgrade_output.d/20240904T090831.750/log/pg_upgrade_server.log"
-D "/var/lib/pgsql/10/data" -o "-p 50432 -b  -c listen_addresses='' -c
unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/pgsql'"
start >>
"/mnt/pgdata/pgdirbc15/pg_upgrade_output.d/20240904T090831.750/log/pg_upgrade_server.log"
2>&1
waiting for server to start....2024-09-04 12:08:32.179 CEST [12197] FATAL: 
lock file "postmaster.pid" already exists
2024-09-04 12:08:32.179 CEST [12197] HINT:  Is another postmaster (PID
25407) running in data directory "/mnt/pgdata/pgdir"?
 stopped waiting
pg_ctl: could not start server
Examine the log output.


I tried the without --link, same error.
It seems pg_upgrade -c requires the old server to be stopped.

Reply via email to