mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
In COPY, insert tuples to the heap in batches.
This greatly reduces the WAL volume, especially when the table is narrow. The overhead of locking the heap page is also reduced. Reduced WAL traffic also makes it scale a lot better, if you run multiple COPY processes at the same time.
This commit is contained in:
@@ -97,6 +97,8 @@ extern void FreeBulkInsertState(BulkInsertState);
|
||||
|
||||
extern Oid heap_insert(Relation relation, HeapTuple tup, CommandId cid,
|
||||
int options, BulkInsertState bistate);
|
||||
extern void heap_multi_insert(Relation relation, HeapTuple *tuples, int ntuples,
|
||||
CommandId cid, int options, BulkInsertState bistate);
|
||||
extern HTSU_Result heap_delete(Relation relation, ItemPointer tid,
|
||||
ItemPointer ctid, TransactionId *update_xmax,
|
||||
CommandId cid, Snapshot crosscheck, bool wait);
|
||||
|
||||
Reference in New Issue
Block a user