[PATCH] Support reading large objects with pg_read_all_data - Mailing list pgsql-hackers

From Nitin Motiani
Subject [PATCH] Support reading large objects with pg_read_all_data
Date
Msg-id CAH5HC96dxAEvP78s1-JK_nDABH5c4w2MDfyx4vEWxBEfofGWsw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi Hackers,

It was reported in [1] that pg_dump for a user with pg_read_all_data
fails as pg_read_all_data doesn't have the permission to read large
objects. The discussion on the same thread suggested that this was an
oversight as the goal of pg_read_all_data was to allow running pg_dump
[2].

This patch proposes to fill that gap by modifying
pg_largeobject_aclmask_snapshot to provide ACL_SELECT for the role
PG_READ_ALL_DATA. Note that the patch doesn't make an equivalent
change for PG_WRITE_ALL_DATA as it would effectively provide
pg_write_all_data write access to a system catalog which is explicitly
avoided for system catalogs

Please take a look and let me know what you folks think. If this
approach makes sense, I will update the corresponding docs in the
patch.

Thanks & Regards,
Nitin Motiani
Google


[1] https://www.postgresql.org/message-id/19379-089536632927293f%40postgresql.org
[2] https://www.postgresql.org/message-id/r5a3aqlrrqen2snktdmx5tjeoakp3hmbektlqmeqhij3fqqez4%40zmx3bdscipny

Attachment

pgsql-hackers by date:

Previous
From: Ants Aasma
Date:
Subject: Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?
Next
From: Michael Paquier
Date:
Subject: Re: Add expressions to pg_restore_extended_stats()