Re: BUG #19392: PG_UPGRADE is non-functional on Windows

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "jeff(dot)laing(at)spatialnetworx(dot)ai" <jeff(dot)laing(at)spatialnetworx(dot)ai>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #19392: PG_UPGRADE is non-functional on Windows
Date: 2026-02-04 06:43:40
Message-ID: CAKFQuwYb54KmC3LXzOVsHNcGht8QqfekVFouza=hj6J7ny=yWA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tuesday, February 3, 2026, PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference: 19392
> Logged by: Jeff Laing
> Email address: jeff(dot)laing(at)spatialnetworx(dot)ai
> PostgreSQL version: 18.1
> Operating system: Windows 11
> Description:
>
> After struggling with it for a while, I’ve come to the conclusion that
> PG_UPGRADE is not functional on Windows.

This is a very hard to accept premise and this bug report doesn’t support
it.

>
> This results in command-lines that look like:
>
> "C:/postgresql16/bin/pg_ctl" -w -l
> "C:/postgresql18/data/pg_upgrade_output.d/20260204T130353.043/log/pg_
> upgrade_server.log"
> -D "C:/postgresql16/data" -o "-p 5432 -b " start >>
> "C:/postgresql18/data/pg_upgrade_output.d/20260204T130353.043/log/pg_
> upgrade_server_start.log"
> 2>&1
>
> connection to server at "localhost" (::1), port 5432 failed: fe_sendauth:
> no
> password supplied
> could not connect to source postmaster started with the command:
> "C:/postgresql16/bin/pg_ctl" -w -l
> "C:/postgresql18/data/pg_upgrade_output.d/20260204T130353.043/log/pg_
> upgrade_server.log"
> -D "C:/postgresql16/data" -o "-p 5432 -b " start
> Failure, exiting
>
> Note the quoting around the -o, -p and -b arguments.
> There should perhaps be TWO double-quotes after -o or it should not be
> present.
> There should not be a double-quote after -b

Showing the log files generated by the startup attempts would be helpful.
Your guess here regarding how the “-o” argument’s value behaves is
incorrect, the quotes are precisely where the documentation says they
should be. They should result in something like: “…/postgres -p 5432 -b”
as a subprocess of the pg_ctl command which is valid.

> The problem appears as far back as the 16 sources.
>
>
It seems even more unlikely that if this were the underlying cause it would
have gone undetected for two full releases.

We will need a reproducing bug report with the commands issued and logs
generated.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2026-02-04 06:50:09 Re: BUG #19392: PG_UPGRADE is non-functional on Windows
Previous Message PG Bug reporting form 2026-02-04 02:29:19 BUG #19392: PG_UPGRADE is non-functional on Windows