Fix column privileges for pg_subscription.subwalrcvtimeout

Nisha Moond <nisha.moond412@gmail.com>

From: Nisha Moond <nisha.moond412@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Fujii Masao <masao.fujii@gmail.com>
Date: 2026-06-01T13:44:12Z
Lists: pgsql-hackers

Attachments

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

Commits

  1. Fix pg_subscription column privileges for subwalrcvtimeout

  2. Add per-subscription wal_receiver_timeout setting.