Re: DROP CASCADE transitive dependencies

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: DROP CASCADE transitive dependencies
Дата
Msg-id 20181203203236.3snshir7dwwpi7mh@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: DROP CASCADE transitive dependencies  (C GG <cgg0007@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: DROP CASCADE transitive dependencies
Следующее
От: Igor Korot
Дата:
Сообщение: Re: How to watch for schema changes