pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
Date: Sat, 09 Feb 2019 02:26:00 -0500
Message-ID: <16446.1549697160@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+HiwqE4CS4eaWhUeZWBY5LVN2J3qoe6RYAiPiQqQY+2rFTgLg@mail.gmail.com>
References: <20190208201925.GA5901@alvherre.pgsql>
	<29689.1549672900@sss.pgh.pa.us>
	<CA+HiwqE4CS4eaWhUeZWBY5LVN2J3qoe6RYAiPiQqQY+2rFTgLg@mail.gmail.com>

Amit Langote <amitlangote09@gmail.com> writes:
> On Sat, Feb 9, 2019 at 9:41 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> +1.  The best solution would presumably be to go through the normal
>> object deletion mechanism; though possibly there's a reason that
>> won't work given you're already inside some other DDL.

> Maybe:
> - CatalogTupleDelete(trigrel, &trigtup->t_self);
> + RemoveTriggerById(trgform->oid)?

No, that's still the back end of the deletion machinery, and in particular
it would fail to clean pg_depend entries for the trigger.  Going in by the
front door would use performDeletion().  (See deleteOneObject() to get
an idea of what's being possibly missed out here.)

			regards, tom lane




view thread (84+ messages)  latest in thread

Message-ID: <16446.1549697160@sss.pgh.pa.us>
Permalink:  ../16446.1549697160@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16446.1549697160@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, amitlangote09@gmail.com, alvherre@2ndquadrant.com, pg@bowt.ie
  Subject: Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages)
  In-Reply-To: <16446.1549697160@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