From: Michael Banck <mbanck@gmx.net>
To: Holger Jakobs <holger@jakobs.com>
Cc: PostgreSQL mailing list <pgsql-admin@lists.postgresql.org>
Subject: Re: pg_upgrade from 17.10 to 18.4 on Ubuntu fails: Finding the real data directory for the target cluster sh: 1: (null)/postgres: not found
Date: Thu, 13 Aug 2026 14:37:20 +0200
Message-ID: <20260813123719.GB329@p46.dedyn.io;lightning.p46.dedyn.io> (raw)
In-Reply-To: <f5bb021f-8f45-4825-9b4a-39241ea27a2f@jakobs.com>
References: <f5bb021f-8f45-4825-9b4a-39241ea27a2f@jakobs.com>
Hi,
On Wed, Aug 12, 2026 at 12:50:57PM +0200, Holger Jakobs wrote:
> Today a pg_upgrade failed with this awkward message:
>
> Finding the real data directory for the source cluster ok
> Finding the real data directory for the target cluster sh: 1:
> (null)/postgres: not found
What was the exact command line you used?
> Obviously, cmd should contain the path of the oldbin directory, which is to
> be derived from the path of the pg_upgrade being called.
Are you saying you ran the 17 pg_update binary? I am not sure that is
supported/supposed to work, one should use the pg_upgrade binary from
the newer Postgres version (unless I misunderstood you).
Still, the error isn't great and should be improved / this case should
be caught earlier in pre-flight checks probably.
Michael
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-bugs@postgresql.org
Cc: mbanck@gmx.net, holger@jakobs.com, pgsql-admin@lists.postgresql.org
Subject: Re: pg_upgrade from 17.10 to 18.4 on Ubuntu fails: Finding the real data directory for the target cluster sh: 1: (null)/postgres: not found
In-Reply-To: <20260813123719.GB329@p46.dedyn.io;lightning.p46.dedyn.io>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox