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 1f6G3z-0004xO-H2 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Apr 2018 13:45:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f6G3y-0002sX-Fu for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Apr 2018 13:45:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6G3y-0002sK-5M for pgsql-hackers@lists.postgresql.org; Wed, 11 Apr 2018 13:45:26 +0000 Received: from hook.sigaev.ru ([93.180.27.50]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6G3n-0008VT-Rq for pgsql-hackers@postgresql.org; Wed, 11 Apr 2018 13:45:24 +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 4D708B191AA; Wed, 11 Apr 2018 16:45:13 +0300 (MSK) Subject: Re: Partitioned tables and covering indexes To: Amit Langote , Alexander Korotkov Cc: Jaime Casanova , Pg Hackers References: <48893c03-d1c8-62ef-b37d-b2f7dbdb8245@lab.ntt.co.jp> <994fa677-2dac-8fe5-3f39-024cd6406522@lab.ntt.co.jp> From: Teodor Sigaev Message-ID: Date: Wed, 11 Apr 2018 16:45:12 +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: <994fa677-2dac-8fe5-3f39-024cd6406522@lab.ntt.co.jp> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thank you, pushed Amit Langote wrote: > Hi. > > On 2018/04/11 0:36, Teodor Sigaev wrote: >>> ššš Does the attached fix look correct?š Haven't checked the fix with >>> ATTACH >>> ššš PARTITION though. >>> >>> >>> Attached patch seems to fix the problem.š However, I would rather get >>> rid of modifyingšstmt->indexParams.š That seems to be more logical >>> for me.š Also, it would be good to check some covering indexes on >>> partitioned tables.š See the attached patch. >> >> Seems right way, do not modify incoming object and do not copy rather >> large and deep nested structure as suggested by Amit. > > Yeah, Alexander's suggested way of using a separate variable for > indexParams is better. > >> But it willš be better to have a ATTACH PARTITION test too. > > I have added tests. Actually, instead of modifying existing tests, I > think it might be better to have a separate section at the end of > indexing.sql to test covering indexes feature for partitioned tables. > > Attached find updated patch. > > Thanks, > Amit > -- Teodor Sigaev E-mail: teodor@sigaev.ru WWW: http://www.sigaev.ru/