mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +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:
@ -766,7 +766,7 @@ extern void pgstat_initstats(Relation rel);
|
||||
(rel)->pgstat_info->t_counts.t_blocks_hit++; \
|
||||
} while (0)
|
||||
|
||||
extern void pgstat_count_heap_insert(Relation rel);
|
||||
extern void pgstat_count_heap_insert(Relation rel, int n);
|
||||
extern void pgstat_count_heap_update(Relation rel, bool hot);
|
||||
extern void pgstat_count_heap_delete(Relation rel);
|
||||
extern void pgstat_update_heap_dead_tuples(Relation rel, int delta);
|
||||
|
Reference in New Issue
Block a user