Re: DROP CASCADE transitive dependencies - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: DROP CASCADE transitive dependencies
Date
Msg-id 20181203203236.3snshir7dwwpi7mh@alvherre.pgsql
Whole thread Raw
In response to Re: DROP CASCADE transitive dependencies  (C GG <cgg0007@gmail.com>)
List pgsql-general
On 2018-Dec-03, C GG wrote:

> data=# begin;
> BEGIN
> data=# DROP SCHEMA blah CASCADE;
> NOTICE:  drop cascades to 278 other objects
> DETAIL:  drop cascades to type blah.timeclock_compute_hours_type
> ...
> and 178 other objects (see server log for list)
> data=# rollback;
> ROLLBACK
> data=#
> 
> and I can't see any of the other 178 objects in the server log. I did see
> all the deadlock reports because I had left the transaction hanging open
> while I went rubbernecking. ;) Maybe my log level isn't detailed enough.

If you do DROP without cascade, the objects are going to be listed
in the DETAIL field of the ERROR, so you need to have
log_error_verbosity set to verbose or default; if you have it as terse,
they won't appear in the server log.

If you DROP with CASCADE, the objects would appear in a NOTICE message,
which may be below your log_min_messages.  Try with
SET LOCAL log_min_messages TO notice;
in the same transaction, just before the drop.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: DROP CASCADE transitive dependencies
Next
From: Igor Korot
Date:
Subject: Re: How to watch for schema changes