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 1wKL1P-000ryv-02 for pgsql-bugs@arkaria.postgresql.org; Tue, 05 May 2026 19:01: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 1wKL0O-00DTYB-30 for pgsql-bugs@arkaria.postgresql.org; Tue, 05 May 2026 19:00:28 +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 1wKL0O-00DTY2-26 for pgsql-bugs@lists.postgresql.org; Tue, 05 May 2026 19:00:28 +0000 Received: from mail-yx1-xb132.google.com ([2607:f8b0:4864:20::b132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wKL0M-00000000hIc-2PB0 for pgsql-bugs@lists.postgresql.org; Tue, 05 May 2026 19:00:28 +0000 Received: by mail-yx1-xb132.google.com with SMTP id 956f58d0204a3-6587cee8b57so6384444d50.2 for ; Tue, 05 May 2026 12:00:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778007625; cv=none; d=google.com; s=arc-20240605; b=bmQlBrjMNmM4zNuUelQFXkU+vdJvQnRu8ZDxgFT2JPSqSWjVbQ1SMvoSf/a2Of18In dPZTUF4VYj12skiIArG22b4WuR2ikRmieUeB+wmNFBrT8LZcPGwRO+cRM2gMDXn3Tj/0 5WV+8Hb41Jr53ec/F+5sNxF8o3UW/2+K4CmD29EYv3Gut1ELWd8qzOe0m78UpvuuKswp 2jMAk39QLe/7NhvwO4X5DOGUgMyz+ooejA+m3Jcg0r3GAq5rDlhnAimYJjkGwJzk4nj9 hLD5NzK+HRkx1jDTsKLAm/ebAs87DxiHcAb4uXVE7zmRH1tCxgMPu5I6r3DyxEy1UHRW Om1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=44LvC7O1BomvNFBTNl8IN+kxsVosm4Lea3B1EZo0UuU=; fh=8+CJ0YSkoRuHOSOLTaSgviTWzTi3U2Zpy4Infb3F9N8=; b=k92C8+TcSQZ684jX+zxPauyHqUHNj3aomE8d5Z00vW6b9hHdM1kshG+ThKHaKM4Fh8 sXBOIitTeIcMAwWg+VkpSj/uQ3f/3/l16sykwAwJ1S6XAK11IdN1YFy24KmM8VEm13V3 iC5wS+nWJSXD37NjvHNANxd3qRj23/2JFnRDjZitTZUjmcAtIBTE+cP8CjdQfiiJn6pD ct1N8PxqmauIMvErEdscCrzrVlvSso2BacN/BC8CZ6rOH9Sez6xGZz9sgHWDBDCR+oww r6kP8UruiHi/YJCnLx01QsHsuzEjcmxxzpOD1yYYQjtfe8OAo6wW4CHs1I9ioOZ1TEcl l8jw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778007625; x=1778612425; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=44LvC7O1BomvNFBTNl8IN+kxsVosm4Lea3B1EZo0UuU=; b=ZAMVkkRAwoDB7iUAyxqIL3H59FzYC/1CEnty/03Q7aJ4o3PgjbbLqgX7C1S4wu1HrR P6dwSfceW2VVA6h5s+8y+u4oyRnbbOQqG3w9Ax3MDcGOjduP1iJ4Nm/IpTPTVkmGW6v2 //BSTmb0C4oH1D4L5aXBEUpfamt8cPBkbn59i0iv39ImXb1ovIeMyfvxNSUNEJIfsZOv Z+f0CFfD+279rU+ir7wvJfDH4gGAvzmg1ZAVtTkOWCwyMCf4N7Vq/8cOUQ3o21KOA8+N 29TGhm4swnmak0dlFguUzOgVn5a+Ht2tkDovxa1aR8wdwZge5b0imIhql5rKRZQP9oh3 /sQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778007625; x=1778612425; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=44LvC7O1BomvNFBTNl8IN+kxsVosm4Lea3B1EZo0UuU=; b=T3AP/aC2kcCuytvbQ3fRjFiKcHGymOqkrWIGAtBMWqNbyldRz7HeZezd80PiiaeKBc qRF8NgkEQmLPHxe29ySn4OiXBUrkCrAzimo7u3MIg8Cid1VOqr1zH767oqNDdKK4E5Uk 7ON6SotNdpnZYQdGfg+S0FX6oMNIqLwXF9S4dWNaVOGXiYoVGQDalkJ+S8wvRWbaI/r/ ifMyeGNQMunL621gA+iI4wGyxnuA+24+yb+retuaXX54wQAmST3Fcjm3XyR092qSuGBk Oq8EHBEbUmeijViA7E6ebjGX8sVN5OFxHW8Ale2mdvItfZJDG+ydqBJz1KlAc8K/iTUB d0LQ== X-Forwarded-Encrypted: i=1; AFNElJ/NeJ6f2VbJB67gO5X7InKpfgeUzPK0c/t2NDNU3HZ4S1pB2O/Qo9Z536NfP5R8eB4ce/kmIb+MoAuz@lists.postgresql.org X-Gm-Message-State: AOJu0Yx0t9LS4oKzOPGAhj+owSJmKwWN4qUQWYMMyfAi55cIfFrwOlwh nCF05vJNLArys7Ym2xaHbU364n09+q9DoLAFgxyvm1Q6wVFuuy23AVzOZKdlKB9RmRcdJuS8e55 ChflzMLcFYjUXOWMLhoPAogyoZ+CG9WQ= X-Gm-Gg: AeBDievxx0ylM1uhgMibDvxBP9olBxLOdU80Eqhiv1hCGVBq6GAWjr9TcpCo6N7Qcjq y+LY/JEXB002Bz6qnVyW4z3dNdoRexsOuDsPnW9EGoDBedHlbxTkvsExgrmp10MIUP0gVLaCCKm JaruYsekieIAxEUK8qB9cc4eksOOm6HbOUcR5j0puA5AUJ+e0oH8V27VYrzl6mls6MABO1iMG5s 9iYrinO1LerlS0brWpykGN8ipbUSFNnA/8g9vBm5zCvpv9drMdQqc2yN/ZwdJu5wyxW609/PaUs FHE40BWuGZEXkSgK/Q== X-Received: by 2002:a53:b1a1:0:b0:651:c642:92a6 with SMTP id 956f58d0204a3-65c798fa762mr496360d50.21.1778007625108; Tue, 05 May 2026 12:00:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Tue, 5 May 2026 11:59:48 -0700 X-Gm-Features: AVHnY4Je7fwFrSVyqA_0MfpmQWEfK9mMX8EavVv-t47ac9mLwWVmsHQ_XcNEtZM Message-ID: Subject: Re: pg_dumpall can't be restored with different bootstrap superuser To: Euler Taveira Cc: =?UTF-8?B?w4FsdmFybyBSb2Ryw61ndWV6?= , pgsql-bugs@lists.postgresql.org, Javier Maellas , Diego Revenga Content-Type: multipart/alternative; boundary="000000000000e71353065116a879" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e71353065116a879 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 5, 2026 at 11:23=E2=80=AFAM Euler Taveira w= rote: > 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 grants > > to other roles can't be reapplied in a clean database, if the bootstrap > > superuser does not have the same name in both databases. > > > > This is not a bug. > Maybe we should > add a sentence saying that GRANT on roles requires the same bootstrap use= r. > > This does seem to contradict the claim in create role: SUPERUSER These clauses determine whether the new role is a =E2=80=9Csuperuser=E2=80= =9D, who can override all access restrictions within the database. This at least feels like an access restriction being applied to a superuser. IIUC, the reason the bootstrap superuser doesn't get this applied is because as owner of all roles in a system they alone can bypass the "with admin" privilege check. This may not be a bug in the code but it seems a reasonable indicator that our documentation hasn't imparted a solid mental model as to how this is supposed to behave in the new, more locked down, regime. I wouldn't object to giving pg_dumpall a --bootstrap-name parameter though, to avoid having to tell people to perform string munging on its output. We already have a --no-owner option to pg_dump, this doesn't seem all that different. (Or --no-granted-by-on-role-grants ?) (Or make --no-owner on pg_dumpall apply here.) David J. --000000000000e71353065116a879 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, May 5, 2026 at 11:23=E2=80=AFAM Euler Taveira <= euler@eulerto.com> wrote:
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
> to other roles can't be reapplied in a clean database, if the boot= strap
> superuser does not have the same name in both databases.
>

This is not a bug.
=C2=A0
Maybe we should
add a sentence saying that GRANT on roles requires the same bootstrap user.=


This does seem to contradict the cla= im in create role:
SUPERUSER
These clauses determine whethe= r the new role is a =E2=80=9Csuperuser=E2=80=9D, who can override all acces= s restrictions within the database.

This at least=C2= =A0feels like an access restriction being applied to a superuser.=C2=A0 IIU= C, the reason the bootstrap superuser doesn't get this applied is becau= se as owner of all roles in a system they alone can bypass the "with a= dmin" privilege check.

This may not be a bug in t= he code but it seems a reasonable indicator that our documentation hasn'= ;t imparted a solid mental model as to how this is supposed to behave in th= e new, more locked down, regime.

I wouldn't object= to giving pg_dumpall a --bootstrap-name parameter though, to avoid having = to tell people to perform string munging on its output.=C2=A0 We already ha= ve a --no-owner option to pg_dump, this doesn't seem all that different= . (Or --no-granted-by-on-role-grants ?) (Or make --no-owner on pg_dumpall a= pply here.)

David J.

--000000000000e71353065116a879--