Fix column privileges for pg_subscription.subwalrcvtimeout - Mailing list pgsql-hackers

From Nisha Moond
Subject Fix column privileges for pg_subscription.subwalrcvtimeout
Date
Msg-id CABdArM4uA=6nA0BunJwudiEoY1BcWUS_oj_2pkEq_d-YdiBJhw@mail.gmail.com
Whole thread
Responses Re: Fix column privileges for pg_subscription.subwalrcvtimeout
List pgsql-hackers
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.

CC: Fujii-san (subwalrcvtimeout was introduced by commit fb80f38).

--
Thanks,
Nisha

Attachment

pgsql-hackers by date:

Previous
From: Jakob Egger
Date:
Subject: Re: glob support in extension_control_path/dynamic_library_path?
Next
From: Álvaro Herrera
Date:
Subject: Re: Heads Up: cirrus-ci is shutting down June 1st