Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vnWAg-008GyK-1h for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Feb 2026 06:15:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vnWAf-009PiL-2N for pgsql-bugs@arkaria.postgresql.org; Wed, 04 Feb 2026 06:15:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vnSei-008YJQ-0M for pgsql-bugs@lists.postgresql.org; Wed, 04 Feb 2026 02:30:11 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vnSed-00000000xDE-0mIT for pgsql-bugs@lists.postgresql.org; Wed, 04 Feb 2026 02:30:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=iq1ICcxNaNah3T1KX+ZK7t8bc7t0VpAd+9Hj/nox4bw=; b=AuveBxyK+0VBGggF1kJLqcYJ6O R2/wq9cDB/ukL1SysgNx0VRcVO+qimwJ9AweRPK7if7PJx1xLzPdhBcbZKHulY6suGPxa4EZ94g2U uSLCOxY317M2HPPhYoFgcUAjhThgg49A7yPpJgGHPEZph3unPQCIVNOZvtyi2pDniYXJRjuLuphUM WK6XrP3TZSjOPJRT+y3wbdBiGRVxKSxDrHN0JFci9S92wVpAzGhgQ7SHyxHmsjODjQ62conLhXm7+ s6SIZNrx7moMdF0V5PoVusUzLrm16sgk0edgTTWbfRk89Z59iyBUlCobvwo+sjgczm3nKMBk4FHUj b5YaOjuA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vnSeb-002gff-0z for pgsql-bugs@lists.postgresql.org; Wed, 04 Feb 2026 02:30:06 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vnSeZ-001G24-2r for pgsql-bugs@lists.postgresql.org; Wed, 04 Feb 2026 02:30:04 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19392: PG_UPGRADE is non-functional on Windows To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: jeff.laing@spatialnetworx.ai Reply-To: jeff.laing@spatialnetworx.ai, pgsql-bugs@lists.postgresql.org Date: Wed, 04 Feb 2026 02:29:19 +0000 Message-ID: <19392-d713ae74a25d81de@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19392 Logged by: Jeff Laing Email address: jeff.laing@spatialnetworx.ai PostgreSQL version: 18.1 Operating system: Windows 11 Description: =20 After struggling with it for a while, I=E2=80=99ve come to the conclusion t= hat PG_UPGRADE is not functional on Windows. Although there may be a permissions error still present, I can see that the command-line construction is obviously in error. The offending source code is in src\bin\pg_upgrade\server.c =E2=80=93 in th= e 18 sources, it looks like this: /* * Use -b to disable autovacuum and logical replication launcher * (effective in PG17 or later for the latter). */ snprintf(cmd, sizeof(cmd), "\"%s/pg_ctl\" -w -l \"%s/%s\" -D \"%s\" -o \"-p %d -b%s %s%s\" start", cluster->bindir, log_opts.logdir, SERVER_LOG_FILE, cluster->pgconfig, cluster->port, pgoptions.data, cluster->pgopts ? cluster->pgopts : "", socket_string); 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_upgrad= e_server.log" -D "C:/postgresql16/data" -o "-p 5432 -b " start >> "C:/postgresql18/data/pg_upgrade_output.d/20260204T130353.043/log/pg_upgrad= e_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_upgrad= e_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 The problem appears as far back as the 16 sources.