Re: doc: Clarify Routines and Extension Membership

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: doc: Clarify Routines and Extension Membership
Date: 2022-07-15 01:27:17
Message-ID: CAKFQuwY1YtxQHVWUFYvSnOjZ5VPpXjF33V52bSKEwFjK2K=1Aw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 14, 2022 at 2:41 PM Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> On Fri, Jul 8, 2022 at 10:55:55PM -0400, Bruce Momjian wrote:
> > > The/that inconsistency ... choose one. Or actually, the "an ... the"
> > > combination you used elsewhere doesn't grate on the ear either.
> > >
> > > + For each extension, refuse to drop anything if any objects
> (other than the
> > > + extensions listed) depend on it. However, its own member
> objects, and routines
> > > + that are explicitly dependent on this extension, are skipped.
> > > + This is the default.
> > >
> > > "skipped" seems like a horrible choice of word; it could easily be
> read as
> > > "they don't get dropped". I am not convinced that mentioning the
> member
> > > objects here is an improvement either. In the first sentence you are
> > > treating each extension as a monolithic object; why not in the second?
> >
> > I created a modified patch based on this feedback; patch attached. I
> > rewrote the last change.
>
> Patch applied to PG 13 and later, where extension dependency was added.
> Thank you for the patch.
>

Thank you and apologies for being quiet here and on a few of the
other threads. I've been on vacation and flagged as ToDo some of the
non-simple feedback items that have come this way.

The change to restrict and description in drop extension needs to be fixed
up (the other pages look good).

"This option prevents the specified extensions from being dropped if there
exists non-extension-member objects that depends on any the extensions.
This is the default."

At minimum: "...that depend on any of the extensions."

I did just now confirm that if any of the named extensions failed to be
dropped the entire command fails. There is no partial success mode.

I'd like to avoid non-extension-member, and one of the main points is that
the routine dependency is member-like, not actual membership. Hence the
separate wording.

I thus propose to replace the drop extension / restrict paragraph and
replace it with the following:

"This option prevents the specified extensions from being dropped if other
objects - besides these extensions, their members, and their explicitly
dependent routines - depend on them. This is the default."

Also, I'm thinking to change, on the same page (description):

"Dropping an extension causes its component objects,"

to be:

"Dropping an extension causes its member objects,"

I'm not sure why I originally chose component over member...

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-07-15 02:13:01 Re: [PATCH v1] remove redundant check of item pointer
Previous Message Bruce Momjian 2022-07-15 00:49:36 Re: Doc about how to set max_wal_senders when setting minimal wal_level