agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: alain.bourgeois@zetes.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: pg_upgrade -c cannot be run if old cluster is running
Date: Wed, 04 Sep 2024 16:45:54 -0400
Message-ID: <1692842.1725482754@sss.pgh.pa.us> (raw)
In-Reply-To: <172546462173.8361.7114078895863039790@wrigleys.postgresql.org>
References: <172546462173.8361.7114078895863039790@wrigleys.postgresql.org>
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
view thread (9+ messages) latest in thread
Message-ID: <1692842.1725482754@sss.pgh.pa.us>
Permalink: ../1692842.1725482754@sss.pgh.pa.us/
Also on: postgresql.org/message-id/1692842.1725482754@sss.pgh.pa.us
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alain.bourgeois@zetes.com, pgsql-docs@lists.postgresql.org
Subject: Re: pg_upgrade -c cannot be run if old cluster is running
In-Reply-To: <1692842.1725482754@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox