decode.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*-------------------------------------------------------------------------
  2. * decode.h
  3. * PostgreSQL WAL to logical transformation
  4. *
  5. * Portions Copyright (c) 2012-2022, PostgreSQL Global Development Group
  6. *
  7. *-------------------------------------------------------------------------
  8. */
  9. #ifndef DECODE_H
  10. #define DECODE_H
  11. #include "access/xlogreader.h"
  12. #include "access/xlogrecord.h"
  13. #include "replication/logical.h"
  14. #include "replication/reorderbuffer.h"
  15. typedef struct XLogRecordBuffer
  16. {
  17. XLogRecPtr origptr;
  18. XLogRecPtr endptr;
  19. XLogReaderState *record;
  20. } XLogRecordBuffer;
  21. extern void xlog_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf);
  22. extern void heap_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf);
  23. extern void heap2_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf);
  24. extern void xact_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf);
  25. extern void standby_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf);
  26. extern void logicalmsg_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf);
  27. extern void LogicalDecodingProcessRecord(LogicalDecodingContext *ctx,
  28. XLogReaderState *record);
  29. #endif