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 1mhQim-0000IX-4W for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Nov 2021 06:23:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mhQij-0005rG-BP for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Nov 2021 06:23:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhQij-0005r5-2l for pgsql-hackers@lists.postgresql.org; Mon, 01 Nov 2021 06:23:01 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhQif-00073C-5F for pgsql-hackers@lists.postgresql.org; Mon, 01 Nov 2021 06:22:59 +0000 Received: from hrk.local (p2388012-ipbf1027funabasi.chiba.ocn.ne.jp [118.6.6.12]) by oss.nttdata.com (Postfix) with ESMTPSA id 0F2DB60642; Mon, 1 Nov 2021 15:22:51 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at oss.nttdata.com Subject: Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit To: Etsuro Fujita , PostgreSQL Hackers References: From: Fujii Masao Message-ID: <65af8fb4-4c45-9cc3-c6ec-80f3ac488e07@oss.nttdata.com> Date: Mon, 1 Nov 2021 15:22:50 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.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 2021/10/31 18:05, Etsuro Fujita wrote: > Hi, > > As I said before [1], I’m working on $SUBJECT. Attached is a WIP > patch for that. Thanks for the patch! > The patch is pretty simple: if a server option added > by the patch “parallel_commit” is enabled, Could you tell me why the parameter is necessary? Can't we always enable the feature? > * RELEASE > parallel_commit=0: 0.385 ms > parallel_commit=1: 0.221 ms > > * COMMIT > parallel_commit=0: 1.660 ms > parallel_commit=1: 0.861 ms > > With the option enabled, the average latencies for both commands are > reduced significantly! Sounds great! > I think we could extend this to abort cleanup of remote > (sub)transactions during post-abort. Anyway, I think this is useful, > so I’ll add this to the upcoming commitfest. Thanks! + /* Consume whatever data is available from the socket */ + if (!PQconsumeInput(conn)) + pgfdw_report_error(ERROR, NULL, conn, false, sql); Without the patch, PQconsumeInput() is not called before pgfdw_get_result() But could you tell me why you added PQconsumeInput() there? When ignore_errors argument is true, the error reported by PQconsumeInput() should be ignored? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION