reindexdb: Escape index names in parallel catalog query

get_parallel_tabidx_list() builds an array of regclass values, and
incorrectly assigned quotes to the query built, leading to incorrect
queries once the names of the objects included single quotes.

This issue is by embedding each object name inside their own
appendQualifiedRelation() before being attached to the final catalog
query.  Some tests are added.

Issue introduced by 47f99a407de2.

Reported-by: Anthropic OSS program
Author: Anthropic OSS program
Reviewed-by: Álvaro Herrera <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Security: CVE-2026-116325
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2680b0781ac853736be8c93f85c6f581ef5d805f
Author: Michael Paquier <[email protected]>

Modified Files
--------------
src/bin/scripts/common.c           |  5 +++++
src/bin/scripts/reindexdb.c        | 21 +++++++++++++++++----
src/bin/scripts/t/090_reindexdb.pl | 12 ++++++++++++
3 files changed, 34 insertions(+), 4 deletions(-)

Reply via email to