On Thu, 2020-11-26 at 09:07 -0800, Adrian Klaver wrote: > So even if Mats where to break this query: > > INSERT INTO foreign.labels (address, labels) > SELECT address_id, ARRAY_AGG(name) AS labels > FROM labels > GROUP BY 1 > LIMIT 100; > > down into something like this: > > INSERT INTO foreign.labels (address, labels) > VALUES (), (), (), (); > > postgres_fdw would send it as individual INSERTs? Yes, that's the way the FDW API works. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com