summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAmit Kapila2022-12-26 03:28:16 +0000
committerAmit Kapila2022-12-26 03:28:16 +0000
commit5de94a041ed7a51b571db2030ba87600c7fc6262 (patch)
treeaa280ac6e31eccd9a494ac27c893c9eb08b500ee /src/include
parentd3c0cc4447307a2ffbcff8274573b544294e583c (diff)
Add 'logical_decoding_mode' GUC.
This enables streaming or serializing changes immediately in logical decoding. This parameter is intended to be used to test logical decoding and replication of large transactions for which otherwise we need to generate the changes till logical_decoding_work_mem is reached. This helps in reducing the timing of existing tests related to logical replication of in-progress transactions and will help in writing tests for for the upcoming feature for parallelly applying large in-progress transactions. Author: Shi yu Reviewed-by: Sawada Masahiko, Shveta Mallik, Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi Discussion: https://postgr.es/m/OSZPR01MB63104E7449DBE41932DB19F1FD1B9@OSZPR01MB6310.jpnprd01.prod.outlook.com
Diffstat (limited to 'src/include')
-rw-r--r--src/include/replication/reorderbuffer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/replication/reorderbuffer.h b/src/include/replication/reorderbuffer.h
index c700b55b1c..b27a43618a 100644
--- a/src/include/replication/reorderbuffer.h
+++ b/src/include/replication/reorderbuffer.h
@@ -18,6 +18,14 @@
#include "utils/timestamp.h"
extern PGDLLIMPORT int logical_decoding_work_mem;
+extern PGDLLIMPORT int logical_decoding_mode;
+
+/* possible values for logical_decoding_mode */
+typedef enum
+{
+ LOGICAL_DECODING_MODE_BUFFERED,
+ LOGICAL_DECODING_MODE_IMMEDIATE
+} LogicalDecodingMode;
/* an individual tuple, stored in one chunk of memory */
typedef struct ReorderBufferTupleBuf