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 1oZcgm-00056i-Pm for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Sep 2022 18:37:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oZcgk-0007bN-QY for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Sep 2022 18:37:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZcgj-0007bD-JE for pgsql-hackers@lists.postgresql.org; Sat, 17 Sep 2022 18:37:14 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZcgc-0001Nt-Fd for pgsql-hackers@postgresql.org; Sat, 17 Sep 2022 18:37:12 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3D0C05C0276; Sat, 17 Sep 2022 14:37:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 17 Sep 2022 14:37:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1663439825; x=1663526225; bh=w Px3MVe0UbZVocelzeS6VRpxkJDO4QxnE5u8tyqKSxE=; b=OVwjjqdhl55O/RnAM dhomlI58du2D2Lu9tTRlmGaUhHhmox449YsW2EwVY192HTtN/rt1QmSPlOeebESG K4+paohuVI89nLJPeoHR1/BB4sgJOAb3fPv1Ysyuu+S9cKI2MbJGB/pMgL9fjy8N WjeoHPCTNZgk2gTvIpjEsrYysWjKRX57cSJstjenJVWTQLYCawOZga7fkRysbN3G bQDGQv8ejPmOQD4wl0wVRCOmwx0RvsSxBiXXgBfx+Vrzz4xypH3rEeGF5OCH/s2t 1tAuS9hPLhZ+S1nwVhSWnVKOjE5dgRqsI/o04zRIBZhUoyMrkfDMGx1b8GcDvWyc v+6qg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvvddguddvlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpeektdfhkeevudeugfeuleetkefgjeegkeeuudduueev uedvudffgffgteeihfdvfeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgpd gvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 17 Sep 2022 14:37:03 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6E88C35F; Sat, 17 Sep 2022 20:37:01 +0200 (CEST) Date: Sat, 17 Sep 2022 20:37:01 +0200 From: Alvaro Herrera To: David Rowley Cc: Arne Roland , Amit Langote , pgsql-hackers , Zhihong Yu , Julien Rouhaud Subject: Re: missing indexes in indexlist with partitioned tables Message-ID: <20220917183701.dxooicewyk6yy5vd@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Sep-16, David Rowley wrote: > I kinda disagree with Alvaro's fix in 05fb5d661. I think indexlist is > the place to store these details. That commit added the following > comment: > > /* > * Ignore partitioned indexes, since they are not usable for > * queries. > */ > > But neither are hypothetical indexes either, yet they're added to > RelOptInfo.indexlist. > > I think the patch should be changed so that the existing list is used > and we find another fix for the problems Alvaro fixed in 05fb5d661. > Unfortunately, there was no discussion marked on that commit message, > so it's not quite clear what the problem was. I'm unsure if there was > anything other than CLUSTER that was broken. After a bit of trawling through the archives, I found it here: https://www.postgresql.org/message-id/20180124162006.pmapfiznhgngwtjf%40alvherre.pgsql I think there was insufficient discussion and you're probably right that it wasn't the best fix. I don't object to finding another fix. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/