Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6e70-00072L-Bg for pgsql-general@arkaria.postgresql.org; Mon, 01 Feb 2021 18:39:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6e6T-0001He-Bs for pgsql-general@arkaria.postgresql.org; Mon, 01 Feb 2021 18:39:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6clw-0004GE-7l for pgsql-general@lists.postgresql.org; Mon, 01 Feb 2021 17:13:56 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6clp-0006Fd-ED for pgsql-general@postgresql.org; Mon, 01 Feb 2021 17:13:55 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id CC2811D75; Mon, 1 Feb 2021 19:13:47 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cJYKMAb6anMY; Mon, 1 Feb 2021 19:13:44 +0200 (EET) Received: from mail.hot.ee (hot-relayhost1.estpak.ee [213.180.2.79]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id EF89A1D30; Mon, 1 Feb 2021 19:13:44 +0200 (EET) Subject: Re: permission denied for large object 200936761 To: Adrian Klaver , pgsql-general@postgresql.org References: <47c92baa-949b-92d1-c162-1f0d8348fb50@hot.ee> <2eee8862-ea29-3e9c-30ff-82ec7ad4d99f@aklaver.com> <08f90e7b-8d08-d46e-abb7-85dd68bc3078@hot.ee> From: Andrus Message-ID: <6e8bd48a-9c0b-e045-05ee-1cbe334b2bba@hot.ee> Date: Mon, 1 Feb 2021 19:13:38 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------4D90FC59F5B78180D19535DC" Content-Language: et List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------4D90FC59F5B78180D19535DC Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi! >Well the user that runs the pg_dump needs to have permissions on the large objects. For more information see below. How to add permissions to non-superusers for this.? GRANT command GRANT { { SELECT | UPDATE } [, ...] | ALL [ PRIVILEGES ] } ON LARGE OBJECT/|loid|/ [, ...] TO/|role_specification|/ [, ...] [ WITH GRANT OPTION ] Requires large object id. How to grant backup privilege if there are no large objects in database ? Should *lo_compat_privileges * set in postgresql.conf  or is there better way ? >> -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. > select * from  pg_largeobject_metadata returns 3 rows: Oid                      Lomowner   200936761       30152   200936762      30152   200936767       30152 How to find table and schema which is referenced by this ? Andrus. --------------4D90FC59F5B78180D19535DC Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi!

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

How to add permissions to non-superusers for this.?

GRANT command

GRANT { { SELECT | UPDATE } [, ...] | ALL [ PRIVILEGES ] }
    ON LARGE OBJECT loid [, ...]
    TO role_specification [, ...] [ WITH GRANT OPTION ]

Requires large object id. How to grant backup privilege if there are no large objects in database ?

Should  lo_compat_privileges

set in postgresql.conf  or is there better way ?

-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.

select * from  pg_largeobject_metadata

returns 3 rows:

Oid                      Lomowner

  200936761       30152

  200936762      30152

  200936767       30152

How to find table and schema which is referenced by this ?

Andrus.


--------------4D90FC59F5B78180D19535DC--