Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsIb8-000Gq3-2K for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 09:41:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tsIb5-000uyi-Ps for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 09:41:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsIb5-000uy7-5b for pgsql-hackers@lists.postgresql.org; Wed, 12 Mar 2025 09:41:55 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsIaz-002Oc3-1G for pgsql-hackers@lists.postgresql.org; Wed, 12 Mar 2025 09:41:51 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 6140A11402B7; Wed, 12 Mar 2025 05:41:48 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Wed, 12 Mar 2025 05:41:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1741772508; x=1741858908; bh=n YiCbuJFdMzX8ewx5PW/6YiJ8cMGPTvdvxSntGB8y60=; b=EHwRZjVYBxR+hR5KG 8YlHHLUX4HBHcQtzaResqiXbgmkrzDUPCXmJifkw8qeoMX4s7VCg8/on5bYNdb7B W0e/bjArB7mF5o+WE7oABAIzS2CwRQNy44aG+xHuo3qoAD8ifH200IA1AS2U+PkO p4vXUiERTpUQzW5R2NzctjJEPVErvGALsWNCK+o3WaincWA4cwIjPsBwTtQ/+cza tr3//o9Wk7vu6NuXCB9topfCGT7r3HTLznmvDzl4Op0GGrOUjvXRR64IAEy3dyzV HGRSQYKo5spWAwBf9q+NHMOVwJPdyjx5U1PfuWS2DUIo/7Dfa8sZP8MvZdb8XoQ6 PMbYw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdegjeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddt jeenucfhrhhomheplmhlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlh hvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvdehueffhefgueekueef heehgffhuefgfedukeejveduffegffekgeffffevgeehnecuffhomhgrihhnpegvnhhtvg hrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsg gprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrvghkohhr ohhtkhhovhesghhmrghilhdrtghomhdprhgtphhtthhopehorhhlohhvmhhgsehgmhgrih hlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphho shhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepshdruggvrhgvvhihrghnkhhosehpoh hsthhgrhgvshhprhhordhruhdprhgtphhtthhopegrkhhorhhothhkohhvsehpohhsthhg rhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Mar 2025 05:41:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1741772503; bh=zOLPqxqjRtJSve8K16TyBKAj5wMnw4WVMBHsWf1Sl2g=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=SV7k2sZGFzkDxpDwF6Lg1LtXVB2/yKm5W2n6d9Vkn+kzM6/ujRRzuluxg4sLn60mu j7txunWpYUjOBrC/5Wsdli/5dOVxar/WMs3DRUB3+VV8dTmgcpJlTaBN6lsVh9xs0z U/vaSAKczrDyZo0mfdlTjG3rhq68NbAtDTEdcd2LSw2ovXJNb8vK40esCtaREn7udK alK5nXkfBiRpQMLZ3LldwAHhhru6uEg4Y2/CFIY1ydhQ11dUpL6nzG3J8fGT2L17A9 mYFCuOuEWBhkUGqHhqKth1RCA4oawBcjc4LjopWPZB8c+DpV8K3Tk0hQCPC2CYClhE pUzgAGUfkjSag== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id A01B491; Wed, 12 Mar 2025 10:41:43 +0100 (CET) Date: Wed, 12 Mar 2025 10:41:43 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Alexander Korotkov Cc: Alexander Korotkov , pgsql-hackers@lists.postgresql.org, Maxim Orlov , Svetlana Derevyanko Subject: Re: pgsql: reindexdb: Add the index-level REINDEX with multiple jobs Message-ID: <202503120941.6zkwny2okkan@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 2025-Mar-11, Alexander Korotkov wrote: > Thank you for your feedback! I also think that pipelining would be a > better options, but it's too invasive for backpatching. I've written > comments for gen_reindex_command() and run_reindex_command(). I'm > going to push this patch to master and 17 if no objections. Looks good. Actually, I don't understand why is run_reindex_command() calling PQfinish(). Hmm, also, why is the 'async' parameter always given as true? Is that PQfinish() actually dead code? [... Looks at git history ...] Ah! this is actually a problem older than your patch -- it appears that the last (only?) caller with async=false was removed by commit 2cbc3c17a5c1. I think it's worth removing that while you're at it. We no longer need executeMaintenanceCommand() in reindexdb.c anymore either, I think. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/