Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qwuvj-00F4vF-A1 for pgsql-admin@arkaria.postgresql.org; Sun, 29 Oct 2023 01:49:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qwuvh-006Ens-Bg for pgsql-admin@arkaria.postgresql.org; Sun, 29 Oct 2023 01:49:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qwuvh-006Enk-17 for pgsql-admin@lists.postgresql.org; Sun, 29 Oct 2023 01:49:29 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qwuve-003TAu-AP for pgsql-admin@lists.postgresql.org; Sun, 29 Oct 2023 01:49:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 39T1nOrl2028816; Sat, 28 Oct 2023 21:49:24 -0400 From: Tom Lane To: "David G. Johnston" cc: Aditya D , pgsql-admin Subject: Re: pg_restore -L reordering of the statements does not work In-reply-to: References: <1589825.1698431686@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Sat, 28 Oct 2023 18:41:05 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2028814.1698544164.1@sss.pgh.pa.us> Date: Sat, 28 Oct 2023 21:49:24 -0400 Message-ID: <2028815.1698544164@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Sat, Oct 28, 2023, 18:37 Aditya D wrote: >> PS: Don't have super user privileges on the target. > Why can you not create a role on the target that is a member of every other > role and thus can create and reassign delegated permissions and ownership > to any of them. In short, a role that behaves as superuser within this > limited context even if they are not a true superuser. That's going to be essential in any case if the restoring user is to be able to successfully execute the ALTER OWNER commands in the script. You can't give away ownership to a role you don't have the privileges of. regards, tom lane