From 4c88c52ea5d6e300163544f3be85a84067433e82 Mon Sep 17 00:00:00 2001 From: Evgeny Voropaev Date: Mon, 16 Dec 2024 18:13:41 +0800 Subject: [PATCH v60 13/15] Fixed the error that occurred when parsing an XLog record in the DecodeUpdate function. The error occurred when XLOG_HEAP_INIT_PAGE flag was set. Author: Eduard Stepanov Author: Evgeny Voropaev TO-DO: add TAP-test revealing the problem --- src/backend/replication/logical/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c index 63d115a6eb8..e63063807ec 100644 --- a/src/backend/replication/logical/decode.c +++ b/src/backend/replication/logical/decode.c @@ -1002,7 +1002,7 @@ DecodeUpdate(LogicalDecodingContext *ctx, XLogRecordBuffer *buf) Size tuplelen; /* caution, remaining data in record is not aligned */ - data = XLogRecGetData(r) + SizeOfHeapUpdate; + data = rec_data + SizeOfHeapUpdate; datalen = XLogRecGetDataLen(r) - SizeOfHeapUpdate; tuplelen = datalen - SizeOfHeapHeader; -- 2.48.1