| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Noah Misch <noah(at)leadboat(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: PROPERTY GRAPH pg_dump ACL minimization |
| Date: | 2026-07-06 16:40:05 |
| Message-ID: | CA+TgmoY7QztkjrzhxgxzSMFZAnF78-JtXy3Vu2-FJVggKM7vUg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Jun 29, 2026 at 10:33 PM Noah Misch <noah(at)leadboat(dot)com> wrote:
> pg_dump doesn't do its normal ACL minimization for the new PROPERTY GRAPH
> feature. Patch attached. See log message for details.
>
> Most of the patch bulk (modest as it is) exists to keep support for dumping
> from beta1. I'm not sure whether it was worth bothering. Breaking dump from
> a beta is without precedent known to me, so I just erred on the side of not
> breaking it. If we were to decide pg_dump could drop support for betas, I'd
> be fine with that.
Thanks for catching this, Noah.
While reviewing this patch, I wondered whether quoteAclUserName()
exactly matches what the server would do. It has this dire warning:
/* This test had better match what putid() does */
It doesn't any more, quite, because quoteAclUserName() uses this test:
!isalnum((unsigned char) *src) && *src != '_'
And putid uses this test:
!is_safe_acl_char(*src, false)
The difference between the two is that is_safe_acl_char(c) will return
false for any bytes where IS_HIGHBIT_SET(c) returns true. So consider:
CREATE ROLE álvaro;
CREATE PROPERTY GRAPH herrera;
ALTER PROPERTY GRAPH herrera OWNER TO álvaro;
GRANT SELECT ON PROPERTY GRAPH herrera TO PUBLIC;
In a UTF8 database, everything is fine. But with encoding = LATIN1 and
lc_ctype = en_US.ISO8859-1, pg_class.relacl is display with quotes
around álvaro, and the string pg_dump synthesizes lacks them. This
doesn't seem to cause a functional problem, because the ACLs are not
directly compared -- they get parsed first, and that undoes the
quoting. It seems a tad fragile, maybe, but perhaps not worth worrying
about. It's also not really the fault of this patch anyway, but it was
the only thing I found while looking through this, so I figured I
would mention it.
--
Robert Haas
EDB: http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2026-07-06 16:40:56 | Re: remove switch statement in vector8_shift_{left,right} |
| Previous Message | Tristan Partin | 2026-07-06 16:34:58 | Re: Add malloc attribute to memory allocation functions |