summaryrefslogtreecommitdiff
path: root/src/include/replication
diff options
context:
space:
mode:
authorSimon Riggs2017-11-22 18:45:07 +0000
committerSimon Riggs2017-11-22 18:45:07 +0000
commita4ccc1cef5a04cc054af83bc4582a045d5232cb3 (patch)
tree897617e76a9777c039257312e2e4edcba1cbe4b7 /src/include/replication
parent3bae43ca4dc6c3123788044436521f1d33d9f930 (diff)
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
Diffstat (limited to 'src/include/replication')
-rw-r--r--src/include/replication/reorderbuffer.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/include/replication/reorderbuffer.h b/src/include/replication/reorderbuffer.h
index 86effe106bd..b18ce5a9df5 100644
--- a/src/include/replication/reorderbuffer.h
+++ b/src/include/replication/reorderbuffer.h
@@ -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;