Re: postgres_fdw batching vs. (re)creating the tuple slots

Tomas Vondra <tomas.vondra@enterprisedb.com>

From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-06-09T10:30:17Z
Lists: pgsql-hackers

Attachments

Hi,

Here's a v2 fixing a silly bug with reusing the same variable in two 
nested loops (worked for simple postgres_fdw cases, but "make check" 
failed).

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Commits

  1. Fix copying data into slots with FDW batching

  2. Optimize creation of slots for FDW bulk inserts

  3. Adjust batch size in postgres_fdw to not use too many parameters