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

From Andrey V. Lepikhov
Subject Re: POC: postgres_fdw insert batching
Date
Msg-id [email protected]
Whole thread Raw
In response to POC: postgres_fdw insert batching  (Tomas Vondra <[email protected]>)
Responses Re: POC: postgres_fdw insert batching
List pgsql-hackers
On 6/28/20 8:10 PM, Tomas Vondra wrote:
> Now, the primary reason why the performance degrades like this is that
> while FDW has batching for SELECT queries (i.e. we read larger chunks of
> data from the cursors), we don't have that for INSERTs (or other DML).
> Every time you insert a row, it has to go all the way down into the
> partition synchronously.

You added new fields into the PgFdwModifyState struct. Why you didn't 
reused ResultRelInfo::ri_CopyMultiInsertBuffer field and 
CopyMultiInsertBuffer machinery as storage for incoming tuples?

-- 
regards,
Andrey Lepikhov
Postgres Professional



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Added tab completion for the missing options in copy statement
Next
From: Thomas Munro
Date:
Subject: Re: Support for NSS as a libpq TLS backend