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 1qvkg9-0078BX-KT for pgsql-admin@arkaria.postgresql.org; Wed, 25 Oct 2023 20:40:37 +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 1qvkf9-008E7I-Or for pgsql-admin@arkaria.postgresql.org; Wed, 25 Oct 2023 20:39:35 +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 1qvkf9-008E7A-BL for pgsql-admin@lists.postgresql.org; Wed, 25 Oct 2023 20:39:35 +0000 Received: from mail-yw1-x1136.google.com ([2607:f8b0:4864:20::1136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qvkf6-002mmY-F0 for pgsql-admin@lists.postgresql.org; Wed, 25 Oct 2023 20:39:34 +0000 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-5a8ee23f043so1147777b3.3 for ; Wed, 25 Oct 2023 13:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698266370; x=1698871170; darn=lists.postgresql.org; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=HepQDSDzfLKlC/dAd59LRrLq+0inlJdeUOQ2MNf22BE=; b=SXb6875nH0OJxKCDpOgme9s12J40TorTVpZtfT4OZjNT1Txte9Q2izl3PIWCSigb1a +tzligZ3mqvUuoH/GY3LoK+ubcmhZDLqjiCxSGMHlAWIkZWtBj+zXQr05ax70mIPfl/3 e1XORzIpwgjOOiq2GJf/+2C7aWhUa42Z1FL3p9czYwoJs9LFfk3n7ZWlG/+VjR8inLGA cHlSWdZTjPnFtBAGh/evOlQI15sdcix9BD+tfTJT88jBzlhcBOEg3TPRbgc5cPEMw+rL BW07mfAFxAsfUvaaPKMcCBJoyMhpj/xwJ4x8QdojlfH6lzVnXlpcvBdB7lvTjg9IsDep xNCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698266370; x=1698871170; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=HepQDSDzfLKlC/dAd59LRrLq+0inlJdeUOQ2MNf22BE=; b=KANxIhFekbuBK9W4VhGRPpikhC8zQ4XT/Je1u31XMguiTBx3ZTlN/K3cCso72eBJqR HMegcK9Pl+MhLAUmPpei30svumST+1odROi7Qcz0BdNlGFWvOgcdlewyn18GRRfy6Xe3 BLjR2FkQ5m5AkKKuqF/XnqYH5ug+nHSQrnzFSaO2sqC0s4EnSTZBq3DU7FcjXkI65g3m mrogizXRfXwNhUzNYnTf1KUJMRlKb+JpuhnMRomT75OR6kWulBUhByx3gLd47snDZQ87 1qAIDFmskpVfjRJncgWcUhDThGYcg1Boa8RLiGTrGlZLkQFX602MXPRpkl0CebfZTsaI WhcA== X-Gm-Message-State: AOJu0YwlMdF7hPFt21UYnDAPLyJ4k6KYkrUs+Y6wpS5ZzDaw9ETE+Zvs G9wYxHVVChhBfuBK8mTXhcD3nCAQ7X8= X-Google-Smtp-Source: AGHT+IFWKop8UwgZv++nStJGeegmVrVhSIVNmh/M5DKasoPJk1s0f7rkSOyHy0AFQSfLuI25NmYXzw== X-Received: by 2002:a0d:ca58:0:b0:5a8:6286:bee with SMTP id m85-20020a0dca58000000b005a862860beemr16394267ywd.4.1698266370594; Wed, 25 Oct 2023 13:39:30 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:54bc:15c6:6e44:15fa? ([2600:1700:bd2c:b810:54bc:15c6:6e44:15fa]) by smtp.googlemail.com with ESMTPSA id t78-20020a818351000000b0059b4e981fe6sm5303195ywf.102.2023.10.25.13.39.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Oct 2023 13:39:30 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------FW32xsiWuJjGCX2T0JlbWoxd" Message-ID: <302fc72f-fe11-4ea3-b6a8-80bb3ae4359f@gmail.com> Date: Wed, 25 Oct 2023 15:39:29 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: User/Roles, Owner, and privileges migration strategy Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: <202310251932.ozy6lrpoinh2@alvherre.pgsql> From: Ron In-Reply-To: <202310251932.ozy6lrpoinh2@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------FW32xsiWuJjGCX2T0JlbWoxd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/25/23 14:32, Alvaro Herrera wrote: > On 2023-Oct-25, Tom Lane wrote: > >> 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. > In Postgres you're probably right, but I understood that this is RDS, > which offers a superuser-of-sorts. It allows some alien stuff to be > done. Though ... re-reading the question, I see now he's saying it may > be RDS or maybe *other* DBaaS providers, so maybe it works and maybe it > doesn't, depending on the specifics. You can definitely run CREATE ROLE, ALTER ROLE and GRANT statements in AWS RDS Postgresql. You're just not going to get password hashes. -- Born in Arizona, moved to Babylonia. --------------FW32xsiWuJjGCX2T0JlbWoxd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/25/23 14:32, Alvaro Herrera wrote:
On 2023-Oct-25, Tom Lane wrote:

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.
In Postgres you're probably right, but I understood that this is RDS,
which offers a superuser-of-sorts.  It allows some alien stuff to be
done.  Though ... re-reading the question, I see now he's saying it may
be RDS or maybe *other* DBaaS providers, so maybe it works and maybe it
doesn't, depending on the specifics.
You can definitely run CREATE ROLE, ALTER ROLE and GRANT statements in AWS RDS Postgresql. You're just not going to get password hashes.
--
Born in Arizona, moved to Babylonia.
--------------FW32xsiWuJjGCX2T0JlbWoxd--