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 TYAPR01MB29908B1A9704D1D85ECF09BEFEF80@TYAPR01MB2990.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: POC: postgres_fdw insert batching  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Responses Re: POC: postgres_fdw insert batching  (Craig Ringer <craig.ringer@enterprisedb.com>)
List pgsql-hackers
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
> Not sure how is this related to app developers? I think the idea was
> that the libpq features might be useful between the two PostgreSQL
> instances. I.e. the postgres_fdw would use the libpq batching to send
> chunks of data to the other side.

> Well, my point was that we could keep the API, but maybe it should be
> implemented using the proposed libpq batching. They could still use the
> postgres_fdw example how to use the API, but the internals would need to
> be different, of course.

Yes, I understand them.  I just wondered if app developers use the statement batching API for libpq or JDBC in what
kindof apps.  That is, I talked about the batching API itself, not related to FDW.  (So, I mentioned I think I should
asksuch a question in the libpq batching thread.)
 

I expect postgresExecForeignBatchInsert() would be able to use the libpq batching API, because it receives an array of
tuplesand can generate and issue INSERT statement for each tuple.  But I'm not sure either if the libpq batching is
likelyto be committed in the near future.  (The thread looks too long...)  Anyway, this thread's batch insert can be
progressed(and hopefully committed), and once the libpq batching has been committed, we can give it a try to use it and
modifypostgres_fdw to see if we can get further performance boost.
 


Regards
Takayuki Tsunakawa



pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Re: Hybrid Hash/Nested Loop joins and caching results from subplans
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Allow some recovery parameters to be changed with reload