Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gTkRM-0003uw-Lz for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Dec 2018 09:22:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gTkRK-0002QA-6t for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Dec 2018 09:22:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gTkRJ-0002Q1-SF for pgsql-hackers@lists.postgresql.org; Mon, 03 Dec 2018 09:22:54 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gTkRC-0003Lv-HK for pgsql-hackers@postgresql.org; Mon, 03 Dec 2018 09:22:49 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id wB39MdNR007108; Mon, 3 Dec 2018 18:22:39 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id BB5A3EA7C16; Mon, 3 Dec 2018 18:22:39 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id B0A6DEA75DF; Mon, 3 Dec 2018 18:22:39 +0900 (JST) Received: from [127.0.0.1] (unknown [129.60.241.68]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id AACCB400BF2; Mon, 3 Dec 2018 18:22:39 +0900 (JST) Subject: Re: [HACKERS] CLUSTER command progress monitor References: <59A77072.3090401@lab.ntt.co.jp> <59B5F6C0.1090008@lab.ntt.co.jp> <59B7D119.2000101@lab.ntt.co.jp> <3ec1c97a-6293-237a-4e49-1b16a7a33273@lab.ntt.co.jp> From: Tatsuro Yamada Message-ID: Date: Mon, 3 Dec 2018 18:22:20 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Dmitry Dolgov <9erthalion6@gmail.com> Cc: pg@bowt.ie, Robert Haas , PostgreSQL-development , Jeff Janes , Thomas Munro , Michael Paquier X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018/11/29 21:20, Dmitry Dolgov wrote: >> On Fri, Aug 24, 2018 at 7:06 AM Tatsuro Yamada wrote: >> >> On 2017/11/22 6:07, Peter Geoghegan wrote: >>> On Mon, Oct 2, 2017 at 6:04 AM, Robert Haas wrote: >>>> Progress reporting on sorts seems like a tricky problem to me, as I >>>> said before. In most cases, a sort is going to involve an initial >>>> stage where it reads all the input tuples and writes out quicksorted >>>> runs, and then a merge phase where it merges all the output tapes into >>>> a sorted result. There are some complexities; for example, if the >>>> number of tapes is really large, then we might need multiple merge >>>> phases, only the last of which will produce tuples. >>> >>> This would ordinarily be the point at which I'd say "but you're very >>> unlikely to require multiple passes for an external sort these days". >>> But I won't say that on this thread, because CLUSTER generally has >>> unusually wide tuples, and so is much more likely to be I/O bound, to >>> require multiple passes, etc. (I bet the v10 enhancements >>> disproportionately improved CLUSTER performance.) >> >> Hi, >> >> I came back to develop the feature for community. >> V4 patch is corrected these following points: >> >> - Rebase on master (143290efd) >> - Fix document >> - Replace the column name scan_index_relid with cluster_index_relid. >> Thanks to Jeff Janes! >> >> I'm now working on improving the patch based on Robert's comment related to >> "Seqscan and Sort case" and also considering how to handle the "Index scan case". > > Thank you, > > Unfortunately, this patch has some conflicts now, could you rebase it? Also > what's is the status of your work on improving it based on the > provided feedback? > > In the meantime I'm moving it to the next CF. Thank you for managing the CF and Sorry for the late reply. I'll rebase it for the next CF and also I'll clear my head because the patch needs design change to address the feedbacks, I guess. Therefore, the status is reconsidering the design of the patch. :) Regards, Tatsuro Yamada NTT Open Source Software Center