pgsql: Fix pg_stat_progress_cluster command reporting for unprivileged

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix pg_stat_progress_cluster command reporting for unprivileged
Date: 2026-09-10 02:56:05
Message-ID: E1x4UxI-00000004DkZ-3Q7O@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix pg_stat_progress_cluster command reporting for unprivileged users

Previously, when another session ran REPACK, CLUSTER, or VACUUM FULL and
the user lacked permission to view its progress details,
pg_stat_progress_cluster incorrectly reported the command as CLUSTER
instead of NULL.

pg_stat_progress_cluster is based on pg_stat_progress_repack and
translates REPACK into CLUSTER or VACUUM FULL depending on whether index
ordering is requested. However, this translation defaulted to CLUSTER,
incorrectly converting NULL commands returned for insufficient privileges
into CLUSTER.

Fix this translation to preserve a NULL command when the user lacks
permission to view the progress details.

Bump catalog version.

Author: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Chao Li <lic(at)highgo(dot)com>
Discussion: https://postgr.es/m/CAN4CZFMzy2V_wvRCBW5K8=wVCk1-C7nq=8otXO=u+s_1KZHqyA@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d1f742d5d12654173b022fd7723ab206a3e3a3de

Modified Files
--------------
src/backend/catalog/system_views.sql | 5 +++--
src/include/catalog/catversion.h | 2 +-
src/test/regress/expected/rules.out | 5 +++--
3 files changed, 7 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2026-09-10 03:44:01 pgsql: Fix pg_iswcased().
Previous Message Fujii Masao 2026-09-10 02:55:51 pgsql: Fix REPACK command reporting in pg_stat_progress_cluster