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 1qvi2P-006o2k-5w for pgsql-admin@arkaria.postgresql.org; Wed, 25 Oct 2023 17:51:25 +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 1qvi2M-006dfb-K1 for pgsql-admin@arkaria.postgresql.org; Wed, 25 Oct 2023 17:51:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvi2M-006dfT-8P for pgsql-admin@lists.postgresql.org; Wed, 25 Oct 2023 17:51:22 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvi2F-002HIE-Ek for pgsql-admin@lists.postgresql.org; Wed, 25 Oct 2023 17:51:20 +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 39PHpAL41004362; Wed, 25 Oct 2023 13:51:10 -0400 From: Tom Lane To: Alvaro Herrera cc: Aditya D , Ron , pgsql-admin@lists.postgresql.org Subject: Re: User/Roles, Owner, and privileges migration strategy In-reply-to: <202310251127.fhwfz7o7wjio@alvherre.pgsql> References: <202310251127.fhwfz7o7wjio@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 25 Oct 2023 13:27:30 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1004360.1698256270.1@sss.pgh.pa.us> Date: Wed, 25 Oct 2023 13:51:10 -0400 Message-ID: <1004361.1698256270@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2023-Oct-24, Aditya D wrote: >> Thanks a lot Holger and Ron for the reply and valuable inputs. AWS RDS or >> any other PaaS PostgreSQL instances does not support Superuser and to avoid >> multiple pg_dump statements from on-premises to PaaS, is there any >> recommended way? > I would do this using the following steps: > ... I kind of suspect that that's going to be a dead end. If you can't run dump and restore as superuser, it's going to be very hard to deal with a multi-user database, unless you use --no-owner which of course doesn't restore the multiple object ownerships. You might have to resort to separately dumping the objects belonging to each user, and then running each restore as that user. regards, tom lane