Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCv3j-0000mX-39 for pgsql-bugs@arkaria.postgresql.org; Tue, 01 Sep 2020 01:26:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kCv3h-00051T-NC for pgsql-bugs@arkaria.postgresql.org; Tue, 01 Sep 2020 01:26:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCv3h-00051G-B8 for pgsql-bugs@lists.postgresql.org; Tue, 01 Sep 2020 01:26:01 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kCv3e-0007bo-3u for pgsql-bugs@lists.postgresql.org; Tue, 01 Sep 2020 01:26:00 +0000 Received: by mail-qt1-x841.google.com with SMTP id d27so6297111qtg.4 for ; Mon, 31 Aug 2020 18:25:57 -0700 (PDT) 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=Xavhe2U5AqyGVHYt3QEZprQL9+VzwWCskTTljy3yBHM=; b=bsSafEm90m1yY5tKQMDX5+n/qr3IZEZAftcFvS0d7QPMUGuE8CO9dYmmLVSMkgTWod K/dWf0VPCVAwx4wKFO3pSkXL5yqujN2I5XPCfXijeivBVfpRqSgnSX1oe1ZNqPhYrUfK s6Tr3rNrNBKzcwfnXttGXh1inius4rSY3KFp8HSnk0SqQSJz+KNsjpOx7oOb5loSfK/Z jepXsO20K7N6CqpVTEwZbsE7P3lwuTA/rMNgq6ano4UBwbSLvfu42EU/5URtulLoUZ8n LxdchLKpAd70UOZQ/6DAuKPye9xEfdviRh74HMxzeug5STnQgh/ysiN5zWfORiFtjTsb 27YQ== 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=Xavhe2U5AqyGVHYt3QEZprQL9+VzwWCskTTljy3yBHM=; b=UINyhecSIslNOjyLAhR9Hmewa3Plr2p7+S1CAMXP6XUu02pSWmmjMElpHFt3XHNC8a rqA33+26oAr0COF82bjKsWHGjGt5SiWz8UFl90UpqtlBAmnddjwhaHCWSFIm7otKOjWr XVZ7/4aTq3LG9YsWYYdw+cOF/Dcb3gSWACrcMimjEIBpGosV5M3QMQstRv/Thhco591Q yzMyo640j5YCvbRovHpXwEq7DIE/Mw9P4heTyTi0zHyeysJx+2XVXCCo0vMFLDrCpb1I 8Ioc2k1Atm++KPWijCxot3h3dGRPTccMO3sW+P6/CtsdBD6j6e1QAjebzBZh72sFiHVT J9xw== X-Gm-Message-State: AOAM532mRyaCej3n5MspNA6r1nCErNwIo5peF12ylaGzYyGx5WK6HCNF erYDqqi24w0hXURC2MDLTLeTjNcjzI70Uu/CaxOriIGuu9xf4IBoFux3XKdFAmjXdvD9QosQaAM tDjARv/9HzB9icd8cOPOwa+7G3OguAnRctRQEs3rwAh8hWqf5Ziu0dFYfxTw4+9B5Tv8XoMrcDG Pbx01rScNP2kjd7Pg= X-Google-Smtp-Source: ABdhPJygaHrdPljixhJkqbRnyPwIbsvKNl59/4H1SxGlWxK0tNkttQPd2hp9PBk/fEtL5HgYlPRKwQ== X-Received: by 2002:ac8:1787:: with SMTP id o7mr2077338qtj.322.1598923556231; Mon, 31 Aug 2020 18:25:56 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id g45sm13406336qtb.60.2020.08.31.18.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 18:25:55 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6413C2A0EF6; Mon, 31 Aug 2020 21:25:53 -0400 (-04) Date: Mon, 31 Aug 2020 21:25:53 -0400 From: Alvaro Herrera To: Michael Paquier Cc: jan.mussler@zalando.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16594: DROP INDEX CONCURRENTLY fails on partitioned table with a non helpful error message. Message-ID: <20200901012553.GA17180@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200829013433.GA1529@paquier.xyz> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2020-Aug-29, Michael Paquier wrote: > On Fri, Aug 28, 2020 at 08:22:42AM +0900, Michael Paquier wrote: > > Yes, adding that to RemoveRelations() makes sense. Thanks for the > > patch. > > I got some room to test the patch, and the place of the check looks > good to me. I think that I would move the new check before we set > PERFORM_DELETION_CONCURRENTLY for non-temporary relations though, as a > partition tree can be temporary as long as all its members are > temporary. Actually I think you're wrong; if I put it before the check, then if I do "drop index concurrently some_temp_partitioned_index" then it would fail; but if I put it after the check, then it does a normal non-concurrent index and it works. I'm not sure it's necessary to break a case that otherwise works ... (But for that to work I need to test the flag in the bitmask rather than the option in the command, as in the attached). -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --GvXjxJ+pjyke8COw Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v2-0001-Raise-error-on-concurrent-drop-of-partitioned-ind.patch"