pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Subject: Re: Replacing pg_depend PIN entries with a fixed range check
Date: Wed, 14 Jul 2021 15:34:10 -0400
Message-ID: <3562349.1626291250@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFBsxsG+bhcN1pCiEf_trU7w31AbN+OpdGZmKUrNaN3ZJr8qoQ@mail.gmail.com>
References: <3737988.1618451008@sss.pgh.pa.us>
	<3784992.1618504668@sss.pgh.pa.us>
	<1363425.1620858059@sss.pgh.pa.us>
	<CA+TgmobXixznpObPhbiePX9VL5GhN3LaHSXsLQ0oJvK1sC319Q@mail.gmail.com>
	<1506074.1622043428@sss.pgh.pa.us>
	<1938032.1622156030@sss.pgh.pa.us>
	<CAFBsxsG+bhcN1pCiEf_trU7w31AbN+OpdGZmKUrNaN3ZJr8qoQ@mail.gmail.com>

John Naylor <john.naylor@enterprisedb.com> writes:
> On Thu, May 27, 2021 at 6:53 PM Tom Lane <tgl@sss.pgh.pa.us> 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





view thread (16+ messages)  latest in thread

Message-ID: <3562349.1626291250@sss.pgh.pa.us>
Permalink:  ../3562349.1626291250@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3562349.1626291250@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, john.naylor@enterprisedb.com, robertmhaas@gmail.com, rushabh.lathia@gmail.com, tomas.vondra@enterprisedb.com
  Subject: Re: Replacing pg_depend PIN entries with a fixed range check
  In-Reply-To: <3562349.1626291250@sss.pgh.pa.us>
  References: <3737988.1618451008@sss.pgh.pa.us> <3784992.1618504668@sss.pgh.pa.us> <1363425.1620858059@sss.pgh.pa.us> <CA+TgmobXixznpObPhbiePX9VL5GhN3LaHSXsLQ0oJvK1sC319Q@mail.gmail.com> <1506074.1622043428@sss.pgh.pa.us> <1938032.1622156030@sss.pgh.pa.us> <CAFBsxsG+bhcN1pCiEf_trU7w31AbN+OpdGZmKUrNaN3ZJr8qoQ@mail.gmail.com> <3562349.1626291250@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox