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 1kBNTg-0007rc-S3 for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Aug 2020 19:22:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kBNTf-0007xh-KR for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Aug 2020 19:22:27 +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 1kBNTf-0007xU-A3 for pgsql-bugs@lists.postgresql.org; Thu, 27 Aug 2020 19:22:27 +0000 Received: from mail-qv1-xf43.google.com ([2607:f8b0:4864:20::f43]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kBNTc-0001TY-83 for pgsql-bugs@lists.postgresql.org; Thu, 27 Aug 2020 19:22:26 +0000 Received: by mail-qv1-xf43.google.com with SMTP id r19so3189703qvw.11 for ; Thu, 27 Aug 2020 12:22:23 -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=OL8IWjlIspk11j+4/1py86m4WKDyO6EQCnY5f7cmqFk=; b=o8v18F23O+ByqI7xf3hV9ffQP+mRHsNNpTNbSJ7lnSt7Nq3IgjkcaBeWvo7hVIT6e7 /CDXiwU6Dya0ucrd/ai2+zGepkGyyX2gx1bcU26e0kG1+m8CODxVhYzbLe7KtMuBvzH+ Q/zerikx4gvk5p9g3yrFAOJLVZ/E822IGOK/jCDW4xobOpVmLlERH9EdsNU2qvfb+fqM OcP/pjUifj3HtGFMCYoEeiF4W9LfCYA2hpjCQv8Bm2MrQ8hfE1DWQdY/QTBnwY8AgLUk 45sTBRhjSHSIWkOfK7b0wN7AOQJh80VecujKrZaQkdFsIwaLTr7QZ+F6vC8pBLml8tHF ICng== 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=OL8IWjlIspk11j+4/1py86m4WKDyO6EQCnY5f7cmqFk=; b=q9XuTayrCi4g54TM0APuZh9PAh0I7KLWUQNyVot/1ZhMTiP8JgppIyElpHvdw7znbH 1WGqqAC6awnMBCyN3LN1JHDqMZV321QhsUJKeoaX3jA2MGNq94zV0DhfD+y21pcvKeqy O9wBR/78Pu8zrR73jgpniizlAN80UpwDTHDICV1tFWv3vXmaOK5xCFq66zR+cuc4gkFi uDsXmDHA1Xrdei8q/ErhiZwXclpI5gN/NrIOAet50q5nQZdECez1oeGw83uG60QBKAqg I0KlUajyJFv6JvleWg0ioQwkfDXHPryb+Aovq4/yfr7ONxrFzpFTunFC3B4+GqxuKLyb cGRA== X-Gm-Message-State: AOAM532yh/cUY3iwOmIUNIwarEqMeuKqXryGhUqt6UXiKixRiW2io55j 5WEXVYwRbzh3qpSJmErkVDzRP6/a760gY7JAF49XXUK0zrToCNq4pQxPu2kv5KnBZO2OpeQnc+i Dx4CFNWP5l+8a/S3c4S5e+4WZX9ZGlj9G8qZ6iFjI+7F1mfjQ9PU9YMAxl/RWXL5lQD5K841zm9 6+qmYdpgXaZJDa X-Google-Smtp-Source: ABdhPJzMY7Bni//3gEphztpsveK4D3o34AsaCthf5pGAILMe16wpWllvRqYpKhWu3rwzrCWQjvrVJw== X-Received: by 2002:a0c:b598:: with SMTP id g24mr20444706qve.55.1598556141466; Thu, 27 Aug 2020 12:22:21 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id w90sm929864qte.20.2020.08.27.12.22.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 12:22:20 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id CBDAF2A0370; Thu, 27 Aug 2020 15:22:18 -0400 (-04) Date: Thu, 27 Aug 2020 15:22:18 -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: <20200827192218.GA5787@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200827172519.GA5940@alvherre.pgsql> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2020-Aug-27, Alvaro Herrera wrote: > On 2020-Aug-27, Michael Paquier wrote: > > > The error message is really confusing though, so for now I would > > recommend to just drop an error if trying the operation on a > > partitioned table, and we also do that now for CREATE INDEX > > CONCURRENTLY. > > Yeah, let's throw an error if the table is partitioned. My bug -- I'll > go fix it now. ... as attached. I first tried to add a hack directly in index_drop, but that doesn't really work because there's no way to tell whether the partitioned index is going to be dropped first or the index partition -- as that code runs after the dependency tree has been walked. The condition has to be checked before starting the object-drop code proper. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --yrj/dFKFPuw6o+aM Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Raise-error-on-concurrent-drop-of-partitioned-index.patch"