Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
Date: 2019-02-10 18:22:37
Message-ID: CAH2-WzmJCOBCibSPg=MyJaAhfBJWFkX1bmnL=bX1xEd3zCbo1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 10, 2019 at 8:50 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >>> [ invent separate primary and secondary partition dependencies? ]

> Here's a version of the patch that does it that way.

Now that I see separate DEPENDENCY_PARTITION_PRI and
DEPENDENCY_PARTITION_SEC dependency types, I agree that it's clearer
that way. It certainly clarifies what external dependency.c callers
are up to.

Minor issue here:

> ! <varlistentry>
> ! <term><symbol>DEPENDENCY_PARTITION_SEC</symbol> (<literal>S</literal>)</term>
> ! <listitem>
> ! <para>
> ! A <quote>secondary</quote> partition dependency acts identically to
> ! a primary one, except that the primary dependency is preferentially
> ! referenced in error messages. An object should have at most one
> ! primary partition dependency, but there could perhaps be multiple
> ! secondary dependencies.
> ! Example: actually, we'll set up a child partitioned index with the
> ! parent partitioned index as primary partition dependency and the
> ! partition table as secondary partition dependency. In this way,
> ! if the user tries to drop the child partitioned index, the error
> ! message will suggest dropping the parent partitioned index instead
> ! (not the table).
> </para>

I think that the wording for this example needs to be tweaked.

Other than that, looks good to me.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-02-10 18:24:18 Re: First-draft release notes for next week's releases
Previous Message Tom Lane 2019-02-10 18:05:24 Re: First-draft release notes for next week's releases