agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pg_stat_progress_cluster command reporting for unprivileged
Date: Thu, 10 Sep 2026 02:56:05 +0000
Message-ID: <E1x4UxI-00000004DkZ-3Q7O@gemulon.postgresql.org> (raw)

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.parragi@percona.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.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(-)



view thread (2+ messages)

Message-ID: <E1x4UxI-00000004DkZ-3Q7O@gemulon.postgresql.org>
Permalink:  ../E1x4UxI-00000004DkZ-3Q7O@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x4UxI-00000004DkZ-3Q7O@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: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix pg_stat_progress_cluster command reporting for unprivileged
  In-Reply-To: <E1x4UxI-00000004DkZ-3Q7O@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