v1-0001-Align-logical-message-LSN-with-other-operations.patch
text/x-diff
Filename: v1-0001-Align-logical-message-LSN-with-other-operations.patch
Type: text/x-diff
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v1-0001
Subject: Align logical message LSN with other operations
| File | + | − |
|---|---|---|
| src/backend/replication/logical/decode.c | 1 | 1 |
| src/test/subscription/t/020_messages.pl | 1 | 1 |
From 8a51b34aa0f9c358b28855a5349fb7084f5a6e66 Mon Sep 17 00:00:00 2001 From: Atsushi Torikoshi <torikoshia@oss.nttdata.com> Date: Mon, 8 Jun 2026 21:44:33 +0900 Subject: [PATCH v1] Align logical message LSN with other operations The regression test is adjusted accordingly. The test only emits a single non-transactional logical message, which is decoded with xid = 0, so filtering on xid = 0 seems to be sufficient to identify the message without matching on its LSN. --- src/backend/replication/logical/decode.c | 2 +- src/test/subscription/t/020_messages.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c index c944be4ac83..09efc15e454 100644 --- a/src/backend/replication/logical/decode.c +++ b/src/backend/replication/logical/decode.c @@ -668,7 +668,7 @@ logicalmsg_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf) if (!message->transactional) snapshot = SnapBuildGetOrBuildSnapshot(builder); - ReorderBufferQueueMessage(ctx->reorder, xid, snapshot, buf->endptr, + ReorderBufferQueueMessage(ctx->reorder, xid, snapshot, buf->origptr, message->transactional, message->message, /* first part of message is * prefix */ diff --git a/src/test/subscription/t/020_messages.pl b/src/test/subscription/t/020_messages.pl index ac518849156..26dede093df 100644 --- a/src/test/subscription/t/020_messages.pl +++ b/src/test/subscription/t/020_messages.pl @@ -107,7 +107,7 @@ $result = $node_publisher->safe_psql( 'proto_version', '1', 'publication_names', 'tap_pub', 'messages', 'true') - WHERE lsn = '$message_lsn' AND xid = 0 + WHERE xid = 0 )); is($result, qq(77|0), 'non-transactional message on slot is M'); -- 2.48.1