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

From Tom Lane
Subject Re: pg_upgrade -c cannot be run if old cluster is running
Date
Msg-id 1692842.1725482754@sss.pgh.pa.us
Whole thread Raw
In response to pg_upgrade -c cannot be run if old cluster is running  (PG Doc comments form <noreply@postgresql.org>)
Responses RE: pg_upgrade -c cannot be run if old cluster is running
RE: pg_upgrade -c cannot be run if old cluster is running
List pgsql-docs
PG Doc comments form <noreply@postgresql.org> writes:
> 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 tested this case, and it seems to work for me.  pg_upgrade will try
to start a server in the old data directory, but if that fails it will
assume that there's a live server to run the checks against.

> 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.

What I suspect happened here is some confusion about where the lock
file is, leading to not recognizing that there was possibly an old
live server.  You didn't supply enough detail to reproduce the
problem, but perhaps check whether the old and new Postgres versions
were built with similar options.

            regards, tom lane



pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: pg_upgrade -c cannot be run if old cluster is running
Next
From: Kirk Parker
Date:
Subject: Behavior of ON DELETE CASCADE in CTEs