missing GRANT on pg_subscription columns

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: missing GRANT on pg_subscription columns
Date: 2021-06-03 13:41:24
Message-ID: b8f7c17c-0041-46b6-acfe-2d1f5a985ab4@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I was checking the GRANT on pg_subscription and noticed that the command is not
correct. There is a comment that says "All columns of pg_subscription except
subconninfo are readable". However, there are columns that aren't included: oid
and subsynccommit. It seems an oversight in the commits 6f236e1eb8c and
887227a1cc8.

There are monitoring tools and data collectors that aren't using a
superuser to read catalog information (I usually recommend using pg_monitor).
Hence, you cannot join pg_subscription with relations such as
pg_subscription_rel or pg_stat_subscription because column oid has no
column-level privilege. I'm attaching a patch to fix it (indeed, 2 patches
because of additional columns for v14). We should add instructions in the minor
version release notes too.

This issue was reported by Israel Barth.

--
Euler Taveira
EDB https://www.enterprisedb.com/

Attachment Content-Type Size
grant-pg-subscription.patch text/x-patch 1.4 KB
grant-pg-subscription-10-13.patch text/x-patch 1.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-06-03 13:45:35 Re: Failures with gcd functions with GCC snapshots GCC and -O3 (?)
Previous Message Heikki Linnakangas 2021-06-03 13:15:59 Re: speed up verifying UTF-8