Re: permission denied for large object 200936761

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Andrus <kobruleht2(at)hot(dot)ee>, pgsql-general(at)postgresql(dot)org
Subject: Re: permission denied for large object 200936761
Date: 2021-02-01 16:58:58
Message-ID: f4bf75cc-cb4a-9154-4189-2ae8e539ccf9@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/1/21 8:32 AM, Andrus wrote:
> Hi!
>>>
>>> Database does not contain large objects.
>>>
>>> pg_dump starts to throw error
>>>
>>> ERROR:  permission denied for large object 200936761
>>
>> Did you do the pg_dump as a superuser?
>
> No.
>
> pg_dump needs to be invoked by non-superuser also. It backs up two
> schemas, public and firma74 .

Well the user that runs the pg_dump needs to have permissions on the
large objects. For more information see below.

>
> -n public -n firma74
>
> command line options are used.
>
>>
>> You can query that to see what is there. I would not go about deleting
>> until you find what the large objects are for.
>>
> select * from pg_largeobject
>
> returns empty table.

I haven't used large objects in a while. Forgot that they now have
permissions associated with them. Try:

https://www.postgresql.org/docs/12/catalog-pg-largeobject-metadata.html

instead.

>
> Database has approx 50 schemas and many thousands of tables.
>
> Andrus.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jiří Pavlovský 2021-02-01 17:03:44 Re: libpq and mysterious "invalid byte sequence for encoding UTF8".
Previous Message Andrus 2021-02-01 16:32:54 Re: permission denied for large object 200936761