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 1hlkEj-0004kl-3m for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jul 2019 01:20:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlkEh-0002BT-5z for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jul 2019 01:20:31 +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 1hlkEf-00027N-Ip for pgsql-hackers@lists.postgresql.org; Fri, 12 Jul 2019 01:20:30 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlkEY-0001sw-30 for pgsql-hackers@lists.postgresql.org; Fri, 12 Jul 2019 01:20:29 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1D2B9222F0; Thu, 11 Jul 2019 21:20:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 11 Jul 2019 21:20:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=boAni+ugngg2wbZ2MidBpYW3BPm fF2l9xCVh55jbpCE=; b=Xajrx0M1HRFsSyJSSKraTe2u0+Vv1q/cdTDB4AxOUr3 HiGNOZq4DBetj/Hx1SP9a+Brj1osZV1jI5+xUXwValuiMc6xtRisI32Cl907H7bF ixioM/d+z/2qbRZl2RyHAPNPs96nxnC2biZsI7a1vUlRw9CaTwX0ruqrBskDviaw T5WPspTh78E1JNDtX7Us8xGUUwkcIzHF9ZgGb59s8+SJtkCweUDH52L7lbyFhqbV RoKTGVZSRQQnrp9MejyTzacJ3GFt3rrZvml5ZoNbCKIyixjSnoyZ/FdyxgaIlh05 I3vdXxzYoGW+mgHRPgOgPUtGYWhWrYl+GLGV6z4ckqQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=boAni+ ugngg2wbZ2MidBpYW3BPmfF2l9xCVh55jbpCE=; b=QuVGCkvuGMqrJix9hU3DPE vtFe7FcKy732+K92h+dgtgLMacve3QIvwQf+mnOjn8rpgv1CViiDZnBeGYIaAr3P QJtIVVyztQVnJndyQBCaceYd0OMO2J1a+3A24AjSzkyB3osDdCqd1EbMVAsogFL8 FCMbnX3WFSJbYiTKsv1jE4G/D4GeV72L9GN+1D2tbf+G4vUMCl+8DjGbXpfqsKCW PNCQzrA3heGDm0oF/qBt8VQKfrbNREB3Q/cpw3MV4h8yPfA15BO91ivaeFZwWjSN ZkMoptDHse6XhM25WI/WJHUhqGHzjd3qG/NBhj9Evsi0GxaPJJ0uHPhSRvb0kk5Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrgeelgdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeduuddurddutddvrddukedtrddukeehnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluh hsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 12286380076; Thu, 11 Jul 2019 21:20:12 -0400 (EDT) Date: Fri, 12 Jul 2019 10:20:07 +0900 From: Michael Paquier To: Julien Rouhaud Cc: Alvaro Herrera , Peter Eisentraut , Thomas Munro , Daniel Verite , Tom Lane , PostgreSQL Hackers , Kevin Grittner Subject: Re: Add parallelism and glibc dependent only options to reindexdb Message-ID: <20190712012007.GA2149@paquier.xyz> References: <20190710141531.GA27615@alvherre.pgsql> <20190711040433.GG4500@paquier.xyz> <20190711133417.GK4500@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 11, 2019 at 06:22:25PM +0200, Julien Rouhaud wrote: > I think t hat it makes the code quite cleaner to have the selection > outside ConsumeIdleSlot. Actually, you have an issue with ConsumeIdleSlot() if there is only one parallel slot, no? In this case the current patch returns immediately the slot available without waiting. I think that we should wait until the slot becomes free in that case as well, and switch isFree to false. If you want to keep things splitted, that's fine by me, I would still use "Get" within the name for the routine, and rename the other to get_idle_slot_internal() or get_idle_slot_guts() to point out that it has an internal role. > You're talking about getQuerySuccess right? That was actually the > original comment of a function I renamed. +1 to improve it, but this > function is in common.c and doesn't deal with parallel slot at all, so > I'll just drop the slang parts. If we can design a clean interface with better comments, we can use this occasion to browse the whole thing and make it better. -- Michael --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl0n4EcACgkQnvQgOdby QH3nRg//ZfovlMSptHZzeiObEjg5BRu4jzG5A8N5eRMfQWePntXzBNSvNT6fKLLT IW1tK0R3QSTuZ3z+pV3LEHNovwtdYd6YAo5qvZqTH8MGVhzQDCt0u1YfhVQJ1fcH Yff3Cec/1C6ZH5rtbAdL4aHNGsXkyvVGhP4BBupNxBpe7QtNLd3JuWXPeEP+f9wC jFhNxmtdX908VGHBGR1W7FHSab9VJo8pdgrllfPEFBesZfRgXUn6VZT6OO8M3QzP 3LL8FgEFAn/bXXg+fOnc3GK1HnmK/+kOZ80yp02xX/lwWwhat4SghkC6tuRU+RJV 9XU+U6OagZV54xOT5n+WWggRDLRK50sZOwGnwdsBjenWQh+BCNGkiWigtCTBVmR1 Y9c8ocFc2W8/juPAFIco2/K2E4veFBSWi5/JE+5T+0nNJST2PprNSFD/Whbn17Z7 b0PS2BrlwsIYb+5WMqHtcDVw1IhE6tV/raVQbY72McyNJXAoDTSp05/7N2JWfkeN OeUb4+JKTqhN90ZFcW60qN/spx/rRvCvf4LFjead5Iuw8Q1L5+mBK1Rs4hAqwyBu 6AxVMJbHJlYSN4tH2mxxY14Ue8FrNJ3GbrAn82JM4AMaEnteSPSgftEh717aILi/ XLCImfdhFaQmPObudcDONHOXkZBbsllk+Dm4rMdnVzBt1jLqKQk= =FmCN -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--