Re: BUG #19908: pg_upgrade --check crashes instance if running in a different PID Namespace then the old cluster

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: schefner20(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19908: pg_upgrade --check crashes instance if running in a different PID Namespace then the old cluster
Date: 2026-11-16 20:16:46
Message-ID: CA+TgmoaY4bO5dh8FXjo=Ec3J=gXHZdFgfQY5pWdKAh7wzPejSA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Nov 16, 2026 at 10:55 AM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> Before the upgrade I wanted to test 'pg_upgrade --check ...' on the 14
> Instance while it was still running, since --check signals to me that
> nothing should break running it.
> None the less the command broke my instance. Im going to provide the
> commands i did now with some errors.
>
> Possible Explanation:
> - pg_upgrade read the postmaster.pid and checked if the PID exists
> - it then couldn't find a process with that PID because the container,
> where pg_upgrade was running on, has its own PID namespace
> - since it can't find the PID, pg_upgrade startet a second instance

This is unfortunate, but I'm not sure what to do about it. Because the
servers are running in different PID namespaces, and apparently also
different IPC namespaces, the usual interlocks don't work, so when
pg_upgrade tries to start a new postmaster, bad things can happen. The
obvious answer is to never try to start a new server in --check mode,
but then --check wouldn't be able to ignore a stale postmaster.pid
file any more. I'm not sure how important it is for us to be able to
ignore stale postmaster.pid files is here, but my guess is that some
people would complain if we didn't.

--
Robert Haas
Databricks

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2026-11-16 20:16:55 Re: PG 18 JIT regression: int4range hash breaks multi-key GROUP BY
Previous Message Robert Haas 2026-11-16 20:11:04 Re: BUG #19903: ALTER COLUMN TYPE: "unexpected object depending on column" internal error via partition key