Re: ignore_system_indexes affects DROP SCHEMA ... CASCADE reported number of objects dropped

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ignore_system_indexes affects DROP SCHEMA ... CASCADE reported number of objects dropped
Date: 2018-05-04 03:03:07
Message-ID: CAH2-WzmtXk8aGF2FsP6qx9T6qCjq9tdPj5YoFQaOMQQnSsPXSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 3, 2018 at 7:31 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Ah, I think it's just an order-of-visitation issue then. There are
> dependencies at both the column and whole-table level, specifically
>
> schema collate_tests -> table collate_test4
> schema collate_tests -> domain testdomain_p -> column collate_test4.b
>
> I think if we already know that table collate_test4 is scheduled to be
> deleted, we just ignore column collate_test4.b when the recursion reaches
> that ... but if we visit those two things in the other order, then both
> will be reported as deletion targets. And it's not surprising that
> disabling indexscans on pg_depend changes the visitation order.

I also noticed that there are cases where we see less helpful (though
still technically correct) HINT messages about which other object the
user may prefer to drop.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2018-05-04 03:19:49 Re: ignore_system_indexes affects DROP SCHEMA ... CASCADE reported number of objects dropped
Previous Message Tom Lane 2018-05-04 02:42:41 Re: unused_oids script is broken with bsd sed