mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Generational memory allocator
Add new style of memory allocator, known as Generational appropriate for use in cases where memory is allocated and then freed in roughly oldest first order (FIFO). Use new allocator for logical decoding’s reorderbuffer to significantly reduce memory usage and improve performance. Author: Tomas Vondra Reviewed-by: Simon Riggs
This commit is contained in:
@@ -344,20 +344,7 @@ struct ReorderBuffer
|
||||
*/
|
||||
MemoryContext change_context;
|
||||
MemoryContext txn_context;
|
||||
|
||||
/*
|
||||
* Data structure slab cache.
|
||||
*
|
||||
* We allocate/deallocate some structures very frequently, to avoid bigger
|
||||
* overhead we cache some unused ones here.
|
||||
*
|
||||
* The maximum number of cached entries is controlled by const variables
|
||||
* on top of reorderbuffer.c
|
||||
*/
|
||||
|
||||
/* cached ReorderBufferTupleBufs */
|
||||
slist_head cached_tuplebufs;
|
||||
Size nr_cached_tuplebufs;
|
||||
MemoryContext tup_context;
|
||||
|
||||
XLogRecPtr current_restart_decoding_lsn;
|
||||
|
||||
|
Reference in New Issue
Block a user