pgsql: Fix aclitemout() to work during early bootstrap.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix aclitemout() to work during early bootstrap.
Date: 2026-03-14 17:47:17
Message-ID: E1w1T52-0009cN-2J@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix aclitemout() to work during early bootstrap.

"initdb -d" has been broken since commit f95d73ed4, because I changed
aclitemin to work in bootstrap mode but failed to consider aclitemout.
That routine isn't reached by default, but it is if the elog message
level is high enough, so it needs to work without catalog access too.

This patch just makes it use its existing code paths to print role
OIDs numerically. We could alternatively invent an inverse of
boot_get_role_oid() and print them symbolically, but that would take
more code and it's not apparent that it'd be any better for debugging
purposes.

Reported-by: Greg Burd <greg(at)burd(dot)me>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/4416.1773328045@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2eb87345e18e18395bc5051f72c9f4ca30d70c38

Modified Files
--------------
src/backend/utils/adt/acl.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2026-03-14 18:10:38 pgsql: Switch the semaphore API on Solaris to unnamed POSIX.
Previous Message Tomas Vondra 2026-03-14 14:48:47 pgsql: Tighten asserts on ParallelWorkerNumber