RE: POC: postgres_fdw insert batching - Mailing list pgsql-hackers

From tsunakawa.takay@fujitsu.com
Subject RE: POC: postgres_fdw insert batching
Date
Msg-id TYAPR01MB2990FB55BDC69BAA0342CE68FEA10@TYAPR01MB2990.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: POC: postgres_fdw insert batching  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
From: Tom Lane <tgl@sss.pgh.pa.us>
> The "single target table" could be partitioned, in which case there'll be
> multiple resultrelinfos, some of which could be foreign tables.

Thank you.  I thought so at first, but later I found that ExecInsert() only handles one element in
mtstate->resultRelInfo. So I thought just the first element is processed in INSERT case. 

I understood (guessed) the for loop is for UPDATE and DELETE.  EXPLAIN without ANALYZE UPDATE/DELETE on a partitioned
tableshows partitions, which would be mtstate->resultRelInfo.  EXPLAIN on INSERT doesn't show partitions, so I think
INSERTwill find relevant partitions based on input rows during execution. 


Regards
Takayuki Tsunakawa




pgsql-hackers by date:

Previous
From: "kuroda.hayato@fujitsu.com"
Date:
Subject: RE: ResourceOwner refactoring
Next
From: Craig Ringer
Date:
Subject: Re: Printing backtrace of postgres processes