Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6ca0-0001Ha-TC for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Apr 2018 13:48:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f6cZz-00034F-5y for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Apr 2018 13:47:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6cZy-000345-U4 for pgsql-hackers@lists.postgresql.org; Thu, 12 Apr 2018 13:47:58 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6cZu-00010X-Vz for pgsql-hackers@postgresql.org; Thu, 12 Apr 2018 13:47:57 +0000 Received: from xor.sai.msu.ru (unknown [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: teodor) by hook.sigaev.ru (Postfix) with ESMTPSA id 67627B191AA; Thu, 12 Apr 2018 16:47:53 +0300 (MSK) Subject: Re: Partitioned tables and covering indexes From: Teodor Sigaev To: Peter Geoghegan , Peter Eisentraut Cc: Alexander Korotkov , Alvaro Herrera , Amit Langote , Jaime Casanova , Pg Hackers References: <13123421-1d52-d0e4-c95c-6d69011e0595@sigaev.ru> <20180411194753.vhnwqss2hgqtao6v@alvherre.pgsql> <352da91b-caeb-bbd9-cfe5-f477ad2628be@2ndquadrant.com> Message-ID: <4cfeb27e-e777-94f3-11eb-71fd070d3205@sigaev.ru> Date: Thu, 12 Apr 2018 16:47:52 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thanks to everyone, this part is pushed. I will waiting a bit before pushing topic-stater patch to have a time to look on buildfarm. Alvaro, could you add a comment to CompareIndexInfo() to clarify why it doesn't compare indoptions (like DESC/ASC etc)? It doesn't matter for uniqueness of index but changes an order and it's not clear at least for me why we don't pay attention for that. > In attached path I did: > 1) fix a bug in CompareIndexInfo() which checks opfamily for including column > 2) correct size for all vectors > 3) Add assertion in various places to be sure that we don't try to use including > column as key column > 4) per Peter Geoghegan idea add a error message if somebody adds options to > include column instead silently ignore it. > > -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/