Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKcmg-0000pt-6q for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Aug 2021 08:36:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mKcmf-00016b-6l for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Aug 2021 08:36:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKcme-00016T-SX for pgsql-hackers@lists.postgresql.org; Mon, 30 Aug 2021 08:36:48 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mKcmZ-00060r-5P for pgsql-hackers@lists.postgresql.org; Mon, 30 Aug 2021 08:36:47 +0000 Received: from [192.168.129.197] (unknown [94.25.177.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 9F55A21C25C3; Mon, 30 Aug 2021 11:36:39 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1630312600; bh=nIKO6SPRSfT2Hi1Z3J4cqYYLwctrAhMRRaKLHntvvV0=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=icGHCYsGN3zFvQaO0QzWsJq1OiDOYYOzm2Omzis0o601q6i+gNoGP2mFR2j6zcrrk VVTS7l9p5pxNRFx4BoqNugzl4en2CctWxUToZ4UK5kUsuf3OM2oIJqtzT+DSOR3J9M vYPSWMthlE+VlhKISjDgddaL7UnWHily0r0pv3R0= Subject: Re: Defer selection of asynchronous subplans until the executor initialization stage To: Etsuro Fujita Cc: Zhihong Yu , Kyotaro Horiguchi , Justin Pryzby , PostgreSQL Hackers References: <20210331.101137.148208859959175708.horikyota.ntt@gmail.com> <52d944ea-7d41-1d16-01b7-8d1edf5ea972@postgrespro.ru> <659c37a8-3e71-0ff2-394c-f04428c76f08@postgrespro.ru> From: "Andrey V. Lepikhov" Organization: Postgres Professional Message-ID: <8891e9b4-040f-6d71-fa63-3069046dfb3d@postgrespro.ru> Date: Mon, 30 Aug 2021 13:36:38 +0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/23/21 2:18 PM, Etsuro Fujita wrote: > To just execute what was planned at execution time, I think we should > return to the patch in [1]. The patch was created for Horiguchi-san’s > async-execution patch, so I modified it to work with HEAD, and added a > simplified version of your test cases. Please find attached a patch. > [1] https://www.postgresql.org/message-id/7fe10f95-ac6c-c81d-a9d3-227493eb9055@postgrespro.ru I agree, this way is more safe. I tried to search for another approach, because here isn't general solution: for each plan node we should implement support of asynchronous behaviour. But for practical use, for small set of nodes, it will work good. I haven't any objections for this patch. -- regards, Andrey Lepikhov Postgres Professional