pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
Date: Sun, 10 Feb 2019 14:34:06 -0500
Message-ID: <7832.1549827246@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH2-WzmJCOBCibSPg=MyJaAhfBJWFkX1bmnL=bX1xEd3zCbo1g@mail.gmail.com>
References: <20190205212829.GA20127@alvherre.pgsql>
	<4572.1549404528@sss.pgh.pa.us>
	<CAH2-WzmRtQLJdC7KSdtwxQ65Yk+_Vi89eVqKJvPOx=Xc7WLLKw@mail.gmail.com>
	<20444.1549423295@sss.pgh.pa.us>
	<26049.1549516498@sss.pgh.pa.us>
	<18885.1549642539@sss.pgh.pa.us>
	<CAH2-WzkOqS0bGswVwy2jySuia1SG2sa8rsCzHTxogUwKg7a8PQ@mail.gmail.com>
	<27642.1549815178@sss.pgh.pa.us>
	<24613.1549817419@sss.pgh.pa.us>
	<CAH2-WzmJCOBCibSPg=MyJaAhfBJWFkX1bmnL=bX1xEd3zCbo1g@mail.gmail.com>

Peter Geoghegan <pg@bowt.ie> writes:
> I think that the wording for this example needs to be tweaked.
> Other than that, looks good to me.

After looking closer, I find that it's valid SGML to collapse the two
items into one entry, so how about:

    <varlistentry>
     <term><symbol>DEPENDENCY_PARTITION_PRI</symbol> (<literal>P</literal>)</term>
     <term><symbol>DEPENDENCY_PARTITION_SEC</symbol> (<literal>S</literal>)</term>
     <listitem>
      <para>
       The dependent object was created as part of creation of the
       referenced object, and is really just a part of its internal
       implementation; however, unlike <literal>INTERNAL</literal>,
       there is more than one such referenced object.  The dependent object
       must not be dropped unless at least one of these referenced objects
       is dropped; if any one is, the dependent object should be dropped
       whether or not <literal>CASCADE</literal> is specified.  Also
       unlike <literal>INTERNAL</literal>, a drop of some other object
       that the dependent object depends on does not result in automatic
       deletion of any partition-referenced object.  Hence, if the drop
       does not cascade to at least one of these objects via some other
       path, it will be refused.  (In most cases, the dependent object
       shares all its non-partition dependencies with at least one
       partition-referenced object, so that this restriction does not
       result in blocking any cascaded delete.)
       Primary and secondary partition dependencies behave identically
       except that the primary dependency is preferred for use in error
       messages; hence, a partition-dependent object should have one
       primary partition dependency and one or more secondary partition
       dependencies.
       Note that partition dependencies are made in addition to, not
       instead of, any dependencies the object would normally have.  This
       simplifies <command>ATTACH/DETACH PARTITION</command> operations:
       the partition dependencies need only be added or removed.
       Example: a child partitioned index is made partition-dependent
       on both the partition table it is on and the parent partitioned
       index, so that it goes away if either of those is dropped, but
       not otherwise.  The dependency on the parent index is primary,
       so that if the user tries to drop the child partitioned index,
       the error message will suggest dropping the parent index instead
       (not the table).
      </para>
     </listitem>
    </varlistentry>

			regards, tom lane




view thread (84+ messages)  latest in thread

Message-ID: <7832.1549827246@sss.pgh.pa.us>
Permalink:  ../7832.1549827246@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7832.1549827246@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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pg@bowt.ie, alvherre@2ndquadrant.com
  Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
  In-Reply-To: <7832.1549827246@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