| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19962: pg_dumpall can't produce restorable circular grants with ADMIN OPTION |
| Date: | 2026-12-01 10:40:49 |
| Message-ID: | CALdSSPhZkGdA_A4TQJFAkygaUt9aonaQJHosGO-1PyS2eZShaw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Tue, 1 Dec 2026 at 13:39, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference: 19962
> Logged by: Alexander Lakhin
> Email address: exclusion(at)gmail(dot)com
> PostgreSQL version: 19.0
> Operating system: Ubuntu 24.04
> Description:
>
> The following statements:
> CREATE ROLE r1;
> CREATE ROLE r2;
> CREATE ROLE r3;
>
> GRANT r1 TO r3 WITH ADMIN OPTION;
> GRANT r1 TO r2 WITH ADMIN OPTION GRANTED BY r3;
> GRANT r1 TO r2 WITH ADMIN OPTION GRANTED BY CURRENT_USER;
> GRANT r1 TO r3 WITH ADMIN OPTION GRANTED BY r2;
> REVOKE r1 FROM r2 GRANTED BY CURRENT_USER;
>
> create a role membership configuration that can't be processed by
> pg_dumpall/restore or pg_upgrade, namely:
> pg_dumpall -f dump.sql
>
> produces dump.sql that contains:
> ...
> GRANT r1 TO r3 WITH ADMIN OPTION, INHERIT TRUE GRANTED BY law;
> GRANT r1 TO r2 WITH ADMIN OPTION, INHERIT TRUE GRANTED BY r3;
> GRANT r1 TO r3 WITH ADMIN OPTION, INHERIT TRUE GRANTED BY r2;
>
> An attempt to restore this dump fails with:
> ERROR: ADMIN option cannot be granted back to your own grantor
>
> Reproduced starting from ce6b672e4.
>
>
>
>
I had reported similar case which is real-life example from prod, JFYI
--
Best regards,
Kirill Reshke
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Lakhin | 2026-12-01 11:00:00 | Re: BUG #19962: pg_dumpall can't produce restorable circular grants with ADMIN OPTION |
| Previous Message | Laurenz Albe | 2026-12-01 08:20:46 | Re: SIMILAR TO expressions translate wildcards where they shouldn't |