agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_upgrade: Fix detection of invalid logical replication slots.
Date: Wed, 22 Apr 2026 17:00:24 +0000
Message-ID: <E1wFaw3-002Bp9-1x@gemulon.postgresql.org> (raw)
pg_upgrade: Fix detection of invalid logical replication slots.
Commit 7a1f0f8747a optimized the slot verification query but
overlooked cases where all logical replication slots are already
invalidated. In this scenario, the CTE returns no rows, causing the
main query (which used a cross join) to return an empty result even
when invalid slots exist.
This commit fixes this by using a LEFT JOIN with the CTE, ensuring
that slots are properly reported even if the CTE returns no rows.
Author: Lakshmi N <lakshmin.jhs@gmail.com>
Reviewed-by: Shveta Malik <shveta.malik@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CA+3i_M8eT6j8_cBHkYykV-SXCxbmAxpVSKptjDVq+MFtpT-Paw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e471dc59121932d669d69d0683c71d5df3b527e3
Modified Files
--------------
src/bin/pg_upgrade/info.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Message-ID: <E1wFaw3-002Bp9-1x@gemulon.postgresql.org>
Permalink: ../E1wFaw3-002Bp9-1x@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wFaw3-002Bp9-1x@gemulon.postgresql.org
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-committers@postgresql.org
Cc: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_upgrade: Fix detection of invalid logical replication slots.
In-Reply-To: <E1wFaw3-002Bp9-1x@gemulon.postgresql.org>
* 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