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:55:51
Message-ID: E1x4Ux4-00000004DjB-0Ctg@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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/054c1c3e650b2fe0c44570a59bc4ea05bd2ac142

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 Fujii Masao 2026-09-10 02:56:05 pgsql: Fix REPACK command reporting in pg_stat_progress_cluster
Previous Message Michael Paquier 2026-09-10 02:29:39 pgsql: test_bitmapset: Improve handling of incorrect inputs