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.96) (envelope-from ) id 1wKKQc-000rIO-2l for pgsql-bugs@arkaria.postgresql.org; Tue, 05 May 2026 18:23:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKKQb-00DJDv-2o for pgsql-bugs@arkaria.postgresql.org; Tue, 05 May 2026 18:23: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.96) (envelope-from ) id 1wKKQb-00DJDn-0Z for pgsql-bugs@lists.postgresql.org; Tue, 05 May 2026 18:23:29 +0000 Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wKKQY-00000000h0l-0mZK for pgsql-bugs@lists.postgresql.org; Tue, 05 May 2026 18:23:28 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id E68457A005B; Tue, 5 May 2026 14:23:22 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-06.internal (MEProxy); Tue, 05 May 2026 14:23:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1778005402; x=1778091802; bh=3i94BjAn/70GTCVM/RSTL8DzV7uTfb8R51yIBlP6hs4=; b= eShbGXG2hGD8XLYra3J4lmb9hwUsL18ldW47vhD5Mgaqar/5BrJ6ucTMrNe4g1vt diVwGLi+rE7qnZxn9jEpGIcB8goum/RhhwKITXsvvP70weJXgsDHI0Os2fviTzez So7RuRs88bTzdZFI0J7ByuypkE5ZXa1rzs9qUxPUN0xoeH4wPc0aFid3mwu/af1S W9xAX5Od7onbj+g0sFmAOKUip0NbMEc3NdVWe1zgvP56kQkk7HRutJKj1o6Slepd txPCVmbYGNnjWvRBPiUfKbpozht8xFFzWK0uEogfcFNzqhqxFi/fbGQLhYzI2sSm +DIBkoRcL2+SHHWmtRniFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1778005402; x= 1778091802; bh=3i94BjAn/70GTCVM/RSTL8DzV7uTfb8R51yIBlP6hs4=; b=l zrh641Y7wTUqRjl+CWO41FFNILMHzCbrwFsY8AN03gIelAkOCCsdmKTatsvT0C0G opBMtKA3G96pD/mojVv4kLMByUo3AayoDiLZuCcTi2hD9fP+6ruMNIIbDDgrl7/Y hwkBIkkcJ2xwaLfA+v+uyONaHfQ1mSo9jxz3IRRMZNG5yyl0IZwtllIofmkylFxE TDczEE1258iM+Vpb30WyomTO4iZfy4DBkfSeHoh4KiVWOG6bRY+v7HwF84ESS7Ty 2Mar/p9O3smdNf3I0XzclRn3iTjVgPTG0rmdHObq1CuiLx1Obw2CaDPhyYRV4gqr z1UV46E81ezH5TNZNtLSw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddutddvgedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfgfhulhgv rhcuvfgrvhgvihhrrgdfuceovghulhgvrhesvghulhgvrhhtohdrtghomheqnecuggftrf grthhtvghrnhepfeekueejgeevteffueegffffgfefhedtgeduffejleduuedvhfeflefg jeegfeelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegvuhhlvghrsegvuhhl vghrthhordgtohhmpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopegrlhhvrghrohesuggrthgrughoghhhqhdrtghomhdprhgtphhtthhopegu ihgvghhordhrvghvvghnghgrghhonhiirghlvgiisegurghtrgguohhghhhqrdgtohhmpd hrtghpthhtohepjhgrvhhivghrrdhmrggvlhhlrghssegurghtrgguohhghhhqrdgtohhm pdhrtghpthhtohepphhgshhqlhdqsghughhssehlihhsthhsrdhpohhsthhgrhgvshhqlh drohhrgh X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 32989182007E; Tue, 5 May 2026 14:23:22 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: AbfQ6waq9QVF Date: Tue, 05 May 2026 15:23:01 -0300 From: "Euler Taveira" To: =?UTF-8?Q?=C3=81lvaro_Rodr=C3=ADguez?= , pgsql-bugs@lists.postgresql.org Cc: "Javier Maellas" , "Diego Revenga" Message-Id: In-Reply-To: References: Subject: Re: pg_dumpall can't be restored with different bootstrap superuser Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, May 5, 2026, at 7:51 AM, =C3=81lvaro Rodr=C3=ADguez wrote: > > We have hit an issue with pg_dumpall --roles-only where the role grant= s=20 > to other roles can't be reapplied in a clean database, if the bootstra= p=20 > superuser does not have the same name in both databases. > This is not a bug. There is no way that pg_dumpall knows that the bootst= rap user you want is another one. If you want to share roles and its propert= ies between clusters, don't use different bootstrap users. If you do so, you= should execute another step between dump and restore to replace the source boot= strap user with the target bootstrap user or even collect the error messages a= nd rewrite the affected SQL commands. I don't think an option to inject arbitrary grantor is acceptable for se= curity concerns. There isn't a role specification like BOOTSTRAP_USER (similar = to CURRENT_ROLE or SESSION_USER) that would avoid this situation. Maybe we = should add a sentence saying that GRANT on roles requires the same bootstrap us= er. --=20 Euler Taveira EDB https://www.enterprisedb.com/