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 1i6FCh-0001O8-IH for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Sep 2019 14:27:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i6FCg-0006Fo-Dj for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Sep 2019 14:27:10 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1i6FCg-0006A9-1l for pgsql-hackers@lists.postgresql.org; Fri, 06 Sep 2019 14:27:10 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i6FCd-0007Wn-1p for pgsql-hackers@postgresql.org; Fri, 06 Sep 2019 14:27:09 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 33C593546; Fri, 6 Sep 2019 10:27:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 06 Sep 2019 10:27:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=Py9hq1LtDZc3x2paZGTrtnhBHAebhAU/OqnxtfLovsc=; b=Ow6woZB+ 4R0tt3tbpiAL5pSdCIXDl0mG/TiCk6BcYxF5fUG75yKbWPZxTKQHfa6ciWN6gsyC kTCq08zyl+bVbZ3RT33uu1zVp3BM7hEyafY0rGzWQ3V42k/khCjjDS/2evxdS19N uN1z3R5xRlhwFyQ7IsYWPN3JNSmU5J1L6Dbjt9Q3V+ck+9jhyJfSG8ydvMBE9EbK 42NfsNPkatB7AOd4IlrdJAv8wpxT2HuDPLUJmTt8lqjwQ1roV0lVNDTPBQu+i52i AFWdRw6IhhDSChZzdASJm1iN9z/ixdWaLPfa10DGHWMUGPUGqli1VQhRMPqHvvkJ IxKZDkYfJsvQLA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudejledgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjfgesthekredttderudenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruchfrhhomhcuvdhnugfsuhgrughrrghnthcuoegrlhhvhhgvrh hrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenucffohhmrghinhepvdhnughquhgrughr rghnthdrtghomhenucfkphepudejledrheeirdeftddrudejgeenucfrrghrrghmpehmrg hilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from nimloth.alvh.no-ip.org (unknown [179.56.30.174]) by mail.messagingengine.com (Postfix) with ESMTPA id 2173ED6005B; Fri, 6 Sep 2019 10:27:04 -0400 (EDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 138E2123A56; Fri, 6 Sep 2019 10:27:02 -0400 (-04) Date: Fri, 6 Sep 2019 10:27:02 -0400 From: Alvaro Herrera from 2ndQuadrant To: Michael Paquier Cc: Robert Haas , Masahiko Sawada , Tatsuro Yamada , Rafia Sabih , Dmitry Dolgov <9erthalion6@gmail.com>, Peter Geoghegan , PostgreSQL-development , Jeff Janes , Thomas Munro , Michael Paquier , Peter Eisentraut Subject: Re: [HACKERS] CLUSTER command progress monitor Message-ID: <20190906142702.GA8947@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190906054418.GC1608@paquier.xyz> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Sep-06, Michael Paquier wrote: > Finally comes the question of what do we do for v12? I am adding in > CC Peter, Alvaro being already present, who have been involved in the > commits with CREATE INDEX and REINDEX. It would be sad to revert a > this feature, but well I'd rather do that now than regret later > releasing the feature as it is currently shaped.. Let's see what the > others think. As far as I understand, CREATE INDEX is not affected -- only REINDEX is. Of course, it would be sad to revert even the latter, but it's not as bleak as reverting the whole thing. That said, I did spend some time on this type of issue when doing CREATE INDEX support; you can tell because I defined the columns for block numbers in a scan separately from CREATE INDEX specific fields, precisely to avoid multiple commands running concurrently from clobbering unrelated columns: /* Block numbers in a generic relation scan */ #define PROGRESS_SCAN_BLOCKS_TOTAL 15 #define PROGRESS_SCAN_BLOCKS_DONE 16 I would say that it's fairly useful to have CLUSTER report progress on indexes being created underneath, but I understand that it might be too late to be designing the CLUSTER report to take advantage of the CREATE INDEX metrics. I think a workable, not terribly invasive approach is to have REINDEX process its commands conditionally: have the caller indicate whether progress is to be reported, and skip the calls if not. That would (should) prevent it from clobbering the state set up by CLUSTER. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services