Thread

  1. Re: postgres_fdw: Use COPY to speed up batch inserts

    Matheus Alcantara <matheusssilv97@gmail.com> — 2025-12-11T12:03:23Z

    I've spent some more time on this patch cleaning up some things and
    trying to simplify some things.
    
    I've renamed "copy_for_batch_insert_threshold" to
    "batch_with_copy_threshold" and removed the boolean option
    "use_copy_for_batch_insert", so now to enable the COPY usage for batch
    inserts it only need to set batch_with_copy_threshold to a number
    greater than 0.
    
    Also the COPY can only be used if batching is also enabled (batch_size >
    1) and it will only be used for the COPY FROM on a foreign table and for
    inserts into table partitions that are also foreign tables.
    
    --
    Matheus Alcantara
    EDB: http://www.enterprisedb.com