Re: Fix column privileges for pg_subscription.subwalrcvtimeout

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix column privileges for pg_subscription.subwalrcvtimeout
Date: 2026-06-02 02:56:29
Message-ID: CAA4eK1KbUpkEq5Pv0_ORLqxea-Gzi=PJjvVS4T-r+WTuKDGQMA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 2, 2026 at 8:16 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Mon, Jun 1, 2026 at 10:44 PM Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
> >
> > Hi Hackers,
> >
> > IIUC, all columns of pg_subscription, except subconninfo, are intended
> > to be readable by non-superusers as well. A comment in
> > system_views.sql also states:
> > "-- All columns of pg_subscription except subconninfo are publicly readable."
> >
> > However, 'subwalrcvtimeout' is currently not accessible:
> > Test:
> > postgres=# CREATE ROLE nisha LOGIN PASSWORD 'testpass';
> > CREATE ROLE
> > postgres=# SET SESSION AUTHORIZATION nisha;
> > SET
> > postgres=> select subwalrcvtimeout from pg_subscription;
> > ERROR: permission denied for table pg_subscription
> >
> > It appears the column-level privileges for pg_subscription were not
> > updated when subwalrcvtimeout was added.
> >
> > Attached is a small fix patch to grant public access to this column,
> > consistent with the existing behavior of the other pg_subscription
> > columns.
>
> Thanks for the report and the patch! It looks good to me.
>
> Barring any objections, I'll commit it. For my own reference, since this
> changes the catalog, I'll need to update the catalog version when committing.
>
> BTW, should we add a regression test for column privileges on pg_subscription
> to help catch similar issues in the future?
>

+1. It makes sense because I noticed that patch authors previously
also omitted this part though in most cases those are caught in
review.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-06-02 02:57:54 Re: DOCS - missing SGML markup in some ALTER PUBLICATION examples
Previous Message Tatsuo Ishii 2026-06-02 02:50:39 Re: Row pattern recognition