diff options
| author | Jeff Davis | 2022-01-19 22:58:04 +0000 |
|---|---|---|
| committer | Jeff Davis | 2022-01-19 22:58:49 +0000 |
| commit | 7a5f6b47488d824b1ea1326be4337e2c32325ff2 (patch) | |
| tree | 236969831968cd55bad7ad199131643fdd9f877d /src/include/replication | |
| parent | a3d6264bbce0ff7002be35a907b73b01e2e37f45 (diff) | |
Make logical decoding a part of the rmgr.
Add a new rmgr method, rm_decode, and use that rather than a switch
statement.
In preparation for rmgr extensibility.
Reviewed-by: Julien Rouhaud
Discussion: https://postgr.es/m/ed1fb2e22d15d3563ae0eb610f7b61bb15999c0a.camel%40j-davis.com
Discussion: https://postgr.es/m/20220118095332.6xtlcjoyxobv6cbk@jrouhaud
Diffstat (limited to 'src/include/replication')
| -rw-r--r-- | src/include/replication/decode.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/include/replication/decode.h b/src/include/replication/decode.h index 1db73f35549..a33c2a718a7 100644 --- a/src/include/replication/decode.h +++ b/src/include/replication/decode.h @@ -14,7 +14,21 @@ #include "replication/logical.h" #include "replication/reorderbuffer.h" -void LogicalDecodingProcessRecord(LogicalDecodingContext *ctx, +typedef struct XLogRecordBuffer +{ + XLogRecPtr origptr; + XLogRecPtr endptr; + XLogReaderState *record; +} XLogRecordBuffer; + +extern void xlog_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf); +extern void heap_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf); +extern void heap2_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf); +extern void xact_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf); +extern void standby_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf); +extern void logicalmsg_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf); + +extern void LogicalDecodingProcessRecord(LogicalDecodingContext *ctx, XLogReaderState *record); #endif |
