Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3ke9-0002RO-DA for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 19:34:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3ke8-0006Fa-Dn for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 19:34:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3ke8-00063e-1w for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 19:34:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3ke5-00050H-Vp for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 19:34:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 16EJYANl3562350; Wed, 14 Jul 2021 15:34:11 -0400 From: Tom Lane To: John Naylor cc: Robert Haas , PostgreSQL Hackers , Rushabh Lathia , Tomas Vondra Subject: Re: Replacing pg_depend PIN entries with a fixed range check In-reply-to: References: <3737988.1618451008@sss.pgh.pa.us> <3784992.1618504668@sss.pgh.pa.us> <1363425.1620858059@sss.pgh.pa.us> <1506074.1622043428@sss.pgh.pa.us> <1938032.1622156030@sss.pgh.pa.us> Comments: In-reply-to John Naylor message dated "Wed, 14 Jul 2021 13:56:15 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3562348.1626291250.1@sss.pgh.pa.us> Date: Wed, 14 Jul 2021 15:34:10 -0400 Message-ID: <3562349.1626291250@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk John Naylor writes: > On Thu, May 27, 2021 at 6:53 PM Tom Lane wrote: >> Attached is a rebase over a4390abec. > Looks good to me overall, I just had a couple questions/comments: Thanks for looking! > isObjectPinned and isSharedObjectPinned are now thin wrappers around > IsPinnedObject. Is keeping those functions a matter of future-proofing in > case something needs to be handled differently someday, or reducing > unnecessary code churn? Yeah, it was mostly a matter of reducing code churn. We could probably drop isSharedObjectPinned altogether, but isObjectPinned seems to have some notational value in providing an API that takes an ObjectAddress. > setup_depend now doesn't really need to execute any SQL (unless third-party > forks have extra steps here?), and could be replaced with a direct call > to StopGeneratingPinnedObjectIds. That's a bit more self-documenting, and > that would allow shortening this comment: Hm, I'm not following? setup_depend runs in initdb, that is on the client side. It can't invoke backend-internal functions any other way than via SQL, AFAICS. regards, tom lane