Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gTutd-0003BI-GL for pgsql-general@arkaria.postgresql.org; Mon, 03 Dec 2018 20:32:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gTutb-0007Ny-Lu for pgsql-general@arkaria.postgresql.org; Mon, 03 Dec 2018 20:32:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gTutb-0007Nl-76 for pgsql-general@lists.postgresql.org; Mon, 03 Dec 2018 20:32:47 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gTutT-0001WA-GP for pgsql-general@postgresql.org; Mon, 03 Dec 2018 20:32:45 +0000 Received: by mail-qt1-x841.google.com with SMTP id v11so15443564qtc.2 for ; Mon, 03 Dec 2018 12:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=8DjILGkLa6Tt8jRwHW78TzM81+/B0WeR0og4kuxVzpE=; b=dVf2BBuuHhmDB49Y30K/GmeU77PyjMibwmbX2EmYP3vrbL9ziVw7vwApMP8tuAsTP/ /hAgtmT6Zu0MiFfHrzoJ6/F9JVhGTLnQQRTQ4VzgZePMyxs/y2hiM9yZ6DETmOQiBcZl 0BdORQMXg8/eq79BgwN7a5momjXbHQEJPYXFK25emKZzqfKq/cf0bpA/94KgwRvWi0Xl edUVyoZU5Lt3lFMqGu1/d4+EGpwATrQGxYSgeNvqonAitqnkZzy/kzRSdPx9bWxJwS7t IXF0evKJhOctuTFnqox41Off4bvwzfKtF0QkWLMJDa2xYW5N/DslB85kauhKCKz5Qio5 d6Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=8DjILGkLa6Tt8jRwHW78TzM81+/B0WeR0og4kuxVzpE=; b=KWhOumcgMzvXPg43r2LLe3r21idav85dWSxN2rnQBBC9pPOctZ4XKQNEGGhNa7MZUH 0A/jG//3S6P//Voy6t7uAhIPl+1l04MbQl1XdwdA3Hu3WvO9/nz9Ve8uQQUCZnSEPi9I k4IiteY/uP2BsTSSs+8ijchn56Yn99oSE0NfjgdrW1CLt4Ln2XrH6enLUf6faVFdJ7C7 xMTYvcHaCYZY3zpB/pMregVhN2lMZIyZzrDKDs6IjLv+M4emCIZZkBmMFuvB02T/PiCH L6GHXzpZ06PSfFK+zScPh2P/c6BByJGSceIfEnLuQxWtfgzX8qrNca4oz69wE3ELFnsJ 8BEg== X-Gm-Message-State: AA+aEWYV+k+5AYNQz9A8nNEkbOtu4Gxoo4VhmP6cvalnq7mb8s9dcA8q i43oLxgxS65x2GbIEiz8LaJfOQ== X-Google-Smtp-Source: AFSGD/U7xFpRbrOZ6YMid1nMjIEAmqSVE4rFAvbPLIZyBimNKsYv5r4XUo5yuwhMV2lyVZAS/NbILQ== X-Received: by 2002:a0c:8822:: with SMTP id 31mr17313223qvl.5.1543869158394; Mon, 03 Dec 2018 12:32:38 -0800 (PST) Received: from alvin.alvh.no-ip.org ([201.186.80.75]) by smtp.gmail.com with ESMTPSA id j89sm10587141qkh.34.2018.12.03.12.32.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Dec 2018 12:32:38 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4F6676B9; Mon, 3 Dec 2018 17:32:36 -0300 (-03) Date: Mon, 3 Dec 2018 17:32:36 -0300 From: Alvaro Herrera To: C GG Cc: Tom Lane , pgsql-general@postgresql.org Subject: Re: DROP CASCADE transitive dependencies Message-ID: <20181203203236.3snshir7dwwpi7mh@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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