From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | alain(dot)bourgeois(at)zetes(dot)com |
Cc: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: pg_upgrade -c cannot be run if old cluster is running |
Date: | 2024-09-04 20:45:54 |
Message-ID: | 1692842.1725482754@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
PG Doc comments form <noreply(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Kirk Parker | 2024-09-05 01:23:25 | Behavior of ON DELETE CASCADE in CTEs |
Previous Message | PG Doc comments form | 2024-09-04 15:43:41 | pg_upgrade -c cannot be run if old cluster is running |