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 1wg1di-005rn8-38 for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Jul 2026 14:46:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wg1dh-00AQsH-2s for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Jul 2026 14:46:41 +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 1wg1dh-00AQs9-13 for pgsql-hackers@lists.postgresql.org; Sat, 04 Jul 2026 14:46:41 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wg1de-00000001hRk-1DKK for pgsql-hackers@postgresql.org; Sat, 04 Jul 2026 14:46:40 +0000 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-8478a25f268so996915b3a.2 for ; Sat, 04 Jul 2026 07:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1783176394; x=1783781194; darn=postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=qtS/KX6i/nnWLNSmMlvrothh36PuwnIfFWQrKnTGIyM=; b=PH4RqQycHKcG6OZoy0FSTHRmNj8Roty/hawnAGBc76Tz+EjjrKmXaR9jnh0V3EeMuL kb6g/o6AIpxBDUjaphc5nJrZZ5HS6T+MJ25hJQK8+uTrHdfmTylDzn0gU0ZBGhPEsxeP IF6tX7oP/cCf4czxDZFR9z7nMCqajLC/7i580= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783176394; x=1783781194; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=qtS/KX6i/nnWLNSmMlvrothh36PuwnIfFWQrKnTGIyM=; b=U8rB/FaSoFcwIrLRJC1pqK/OLIS72uXdhArTcnFhE7N91Fj0M/I7MeqXraCuLrbWpM hPMotsxBKeT9Muva45Gi7nF5pw5ENUCvaMblxZa9TTlgqeQ2rl2afDBVozcTSfap1mVI VJFydysXDHnb5uG+kKEn+oihOG3rG4amR1Woq4GhNMUYFNlTA/n4uzXiyLBa8UHETZpY yopfPlQVxbG31Cs5Cht+GOG/ZN+9rahsjUst2Y0VvAL8koO4YrJgDl192Sh5cXIwwI4/ UAEJmv/908wiwiDkc8Oekpjzw+3H5p8J9H3f5V+GvqhVota6EmdvWKLpX6B3dJN/zrUO x3fQ== X-Forwarded-Encrypted: i=1; AHgh+RpiwC46tLY/xHERCB0ftEtHwZNAihHg54S37agmsbgf4co+pCfOox8WRAcT6uLgmU+qi+pe6U930DHEgMyK@postgresql.org X-Gm-Message-State: AOJu0YykKwm4yjWjAcC0q6890rbZ42PonRriSDP5lPexgJkpS9WmKQJh YjCwlYxz6JxzTj4gQ0oRCMvzq/vrANvvRJBemAKir2VE/rAvH7lqdZHO2PoaDCj8Lg== X-Gm-Gg: AfdE7clZlJ/C/GAZyVfIWIHOMJwxfoIzKcwRusZiltQ8pY07q6UXvmquqXKD7GBmZUr oaI2hgIXCB8F3G2fproDnE6YQ/UFzi6SmoWHLt8HLTrl3fo4iXKNurmh1mREkGgpfKR50ovFsPG QxmVsE+btS9j9OuOs91gEYYmgxijetLKOr1enYQHrvvg8QkQ1WWr/Wcx5TtvkO8i2ZGktAhW/6U 7WeFdnqG8QUFNtQlLmQ2w2h8/1UVivl9B/p8/QjzFgEX1TaBg5U3qM2/m0K5cbSTfOY/6GxUFWl X3ueF9ryD/D0iFi7XGhEvKHqPIWui0pkpl7lTjAmG8th56BuHnURi6c86Z564fKIV4EpbkrRAfx NeXcfCFuTZNOZdB9G/4mYoTaVvto2u4L28Srk2bBZFQTvUhBnLPG20ycNlEOS1mFgs0v2YGx5F3 OhRx44fGrqPBO5wR9gjQ3ReaYIIL5aBUJvLiIh2mVwp1noaxXQ0fLec3o= X-Received: by 2002:a05:6a00:22d3:b0:845:e8b5:8c49 with SMTP id d2e1a72fcca58-847f6d5aab3mr3545183b3a.10.1783176393832; Sat, 04 Jul 2026 07:46:33 -0700 (PDT) Received: from microsoft.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847f6dddf8bsm1314607b3a.61.2026.07.04.07.46.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Jul 2026 07:46:32 -0700 (PDT) Date: Sat, 4 Jul 2026 07:46:30 -0700 From: Noah Misch To: Ashutosh Bapat Cc: Tom Lane , pgsql-hackers@postgresql.org Subject: Re: PROPERTY GRAPH pg_dump ACL minimization Message-ID: <20260704144630.34.noahmisch@microsoft.com> References: <20260630023308.c7.noahmisch@microsoft.com> <2453089.1782789061@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.3.0 (2026-01-25) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 01, 2026 at 09:51:13PM +0530, Ashutosh Bapat wrote: > On Tue, Jun 30, 2026 at 8:41 AM Tom Lane wrote: > > Noah Misch writes: > > > 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. > > > > > This entails a catversion bump on the v19 branch. > > > > Those points are not unrelated. If you bump catversion then beta > > testers must use pg_upgrade to get from beta1 to beta2, so you should > > not drop support for dumping from beta1. > > > > I could agree with dropping that support after beta2, though. That'd > > imply having to update via beta2 to beta3 or later, but I doubt those > > hardy enough to test beta1 would have a problem with that. I agree dropping 19beta1 dump support after beta2 would be reasonable, and I hadn't thought of doing so. However, ... > Should there be two commits one which will be reverted post beta2 and > one which will stay after beta2? ... since the sole benefit would be removing ~25 lines, I don't think a followup patch is worth it. I wouldn't object if someone wants to remove that code later. > > > If the master branch > > > already has a post-branch catversion bump by then, the two catversions should > > > remain distinct. I'll use yyyymmdd1 for v19 and yyyymmdd2 for master. > > > > Check. > > > > (I didn't read the patch, just responded to your commentary.) > > I reviewed the patch. > > - tblinfo[i].dacl.acldefault = pg_strdup(PQgetvalue(res, i, i_acldefault)); > + /* acldefault computed below */ > > Rather than spacially separating the acldefault computation, can we > just write a function to compute the acldefault for a given relkind > and owner, and call that function here? Such a function would have just one caller, and that would even further spatially separate the code lines defining the computation. Either way is fine, but I'm not inclined to change to that. > Did you consider writing a test for the same? Somewhat. Long-term, I think a more general test would have a place. > Other than that the patch looks good. Thanks for reviewing. > I wondered whether we are missing special handling for PROPGRAPH at > other places. I looked at other places where we handle OBJECT_SEQUENCE > separately in acl related files. I discovered following missing cases This probably calls for its own thread; feel free to fork the thread for any followup on that. On Fri, Jul 03, 2026 at 04:09:20PM +0530, Ashutosh Bapat wrote: > On Wed, Jul 1, 2026 at 9:51 PM Ashutosh Bapat > wrote: > > > > I wondered whether we are missing special handling for PROPGRAPH at > > other places. I looked at other places where we handle OBJECT_SEQUENCE > > separately in acl related files. I discovered following missing cases > > > > 1. ExecGrant_Relation: I think we should clip the extra privileges > > with a warning when GRANT ... TABLE syntax is used to grant privileges > > on a property graph, just like sequences. To me it looks like we > > should prohibit GRANT ... TABLE on property graph altogether. But > > haven't done so to keep it in sync with sequences. The backward > > compatibility comment, "For backward compatibility, just ... " should > > not be applicable in case of property graph since we can introduce > > whatever behaviour we expect from GRANT ... TABLE right from the first > > release which introduced property graph. But I am not sure if that's > > the only backward compatibility we are talking about here. Those > > commits go more than a few decades back and commit message itself > > doesn't help me much. Maybe someone with a better historical > > perspective may help. I have also added a test scenario for a > > non-property graph privilege to be added using GRANT ... TABLE syntax. > > Since property graphs share the namespace with regular tables, I think > GRANT ... TABLE should be supported on property graphs, but restrict > it to only the privileges applicable to property graphs. I don't have a strong opinion on that, but I likely would have chosen to block GRANT TABLE on a propgraph. The backward compatibility argument written for SEQUENCE likely means that someone noticed GRANT TABLE worked on sequences and decided both that it was a mistake and that reversing the mistake would be a cure worse than the disease. There was a rebuttable presumption that when we add a new grantable object with its own GRANT subtype, older GRANT subtypes should reject that object. > > 2. pg_class_aclmask_ext(): this seems to be another omission. Probably > > innocuous since we will test only SELECT privileges on a property > > graph and ignore other default table privileges. Makes sense.