Re: BUG #19379: Role pg_read_all_data don't allowed read large objects

From: Pierre Forstmann <pierre(dot)forstmann(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "long76(dot)git(at)mail(dot)ru" <long76(dot)git(at)mail(dot)ru>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #19379: Role pg_read_all_data don't allowed read large objects
Date: 2026-01-15 13:47:42
Message-ID: 908bf36d-51e5-469e-aa2e-062ab68dca59@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

It could be interesting to have a new predefined role pg_read_all_lo to
be able to read all LO.

Maybe it could be done with an extension with some background task to
take into account newly created LO but it should be easier to have this
coded without an extension.

Le 15/01/2026 à 14:36, David G. Johnston a écrit :
> On Thursday, January 15, 2026, PG Bug reporting form
> <noreply(at)postgresql(dot)org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference:      19379
> Logged by:          Misha Shaygu
> Email address: long76(dot)git(at)mail(dot)ru
> PostgreSQL version: 17.7
> Operating system:   Kubuntu 24.04
> Description:
>
> My goal: create role for backup any database on server
>
> Steps:
> 1. CREATE USER backup_user;
> 2. GRANT pg_read_all_data TO backup_user;
> 3. pg_dump my_db
> 4. got error to read large object
>
> Following by links
> https://www.postgresql.org/docs/17/predefined-roles.html
> <https://www.postgresql.org/docs/17/predefined-roles.html>
> https://www.postgresql.org/docs/17/lo-implementation.html
> <https://www.postgresql.org/docs/17/lo-implementation.html>
> "SELECT privileges are required to read a large object" and role
> "pg_read_all_data" grant it, but it don't work!
>
> Please fix it, thanks!
>
>
> The docs you link note that all data is “tables, views, sequences”. 
> Large objects are not listed.  Maybe that means the name is a bit
> misleading but it’s working as documented.
>
> Likewise, the LO page doesn’t say anything about read all being
> applicable.
>
> David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Глеб Борков 2026-01-15 14:05:07 Re[2]: BUG #19379: Role pg_read_all_data don't allowed read large objects
Previous Message Andres Freund 2026-01-15 13:45:40 Re: BUG #19379: Role pg_read_all_data don't allowed read large objects