pg_upgrade: Fix detection of invalid logical replication slots.
Masahiko Sawada <msawada@postgresql.org>
Author:
Masahiko Sawada <msawada@postgresql.org>
Date: 2026-04-22T16:59:46Z
Releases:
19 (unreleased)
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
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_upgrade/info.c | modified | +2 −1 |
Discussion
- Fix pg_upgrade to detect invalid logical replication slots on PG19 5 messages · 2026-04-20 → 2026-04-22