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 1l2PKN-00024S-U9 for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jan 2021 02:04:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2PKL-0002cF-6E for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jan 2021 02:04: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 1l2PKL-0002c8-01 for pgsql-hackers@lists.postgresql.org; Thu, 21 Jan 2021 02:04:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2PKI-0007Pm-Q4 for pgsql-hackers@postgresql.org; Thu, 21 Jan 2021 02:04:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 10L23kWg799653; Wed, 20 Jan 2021 21:03:46 -0500 From: Tom Lane To: "tsunakawa.takay@fujitsu.com" cc: "'Tomas Vondra'" , Amit Langote , Zhihong Yu , "Andrey V. Lepikhov" , Tomas Vondra , "pgsql-hackers@postgresql.org" Subject: Re: POC: postgres_fdw insert batching In-reply-to: References: <20200628151002.7x5laxwpgvkyiu3q@development> <16fcfd4c-2d5e-67f7-fa69-9b5d119bac52@enterprisedb.com> <9d94c863-ce7c-ea7f-6b84-834c98929e2f@enterprisedb.com> <7e70a11e-cf5d-2e5f-a802-274c5e0e236b@enterprisedb.com> <3ca9496f-0827-bf21-b709-593de63440a5@enterprisedb.com> <4faa3d! 09-0fc8-c4d6-7aec-87428fabd161@enterprisedb.com> Comments: In-reply-to "tsunakawa.takay@fujitsu.com" message dated "Thu, 21 Jan 2021 01:52:48 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <799651.1611194626.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 20 Jan 2021 21:03:46 -0500 Message-ID: <799652.1611194626@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "tsunakawa.takay@fujitsu.com" writes: > Just for learning, could anyone tell me what this loop for? I thought c= urrent Postgres's DML supports a single target table, so it's enough to ha= ndle the first element of mtstate->resultRelInfo. The "single target table" could be partitioned, in which case there'll be multiple resultrelinfos, some of which could be foreign tables. regards, tom lane