From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: C GG <cgg0007@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@postgresql.org
Subject: Re: DROP CASCADE transitive dependencies
Date: Mon, 3 Dec 2018 17:32:36 -0300
Message-ID: <20181203203236.3snshir7dwwpi7mh@alvherre.pgsql> (raw)
In-Reply-To: <CAJXW-z89ubwoRAxNv7gRXvPZQ95o5KVw9R09B_etM1q3Y-k5AA@mail.gmail.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@2ndquadrant.com, cgg0007@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: DROP CASCADE transitive dependencies
In-Reply-To: <20181203203236.3snshir7dwwpi7mh@alvherre.pgsql>
References: <CAJXW-z89ubwoRAxNv7gRXvPZQ95o5KVw9R09B_etM1q3Y-k5AA@mail.gmail.com> <20181203203236.3snshir7dwwpi7mh@alvherre.pgsql>
* 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