Fix incorrect variable type for origin_id
Started by Masahiko Sawadaover 3 years ago2 messages
Hi,
I realized that there are some places where we use XLogRecPtr for
variables for replication origin id. The attached patch fixes them to
use RepOriginiId instead.
Regards,
--
Masahiko Sawada
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Attachments:
fix_to_use_RepOriginId.patchapplication/octet-stream; name=fix_to_use_RepOriginId.patchDownload
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 4264da5bb0..dfbf091dde 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -714,7 +714,7 @@ DecodePrepare(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
SnapBuild *builder = ctx->snapshot_builder;
XLogRecPtr origin_lsn = parsed->origin_lsn;
TimestampTz prepare_time = parsed->xact_time;
- XLogRecPtr origin_id = XLogRecGetOrigin(buf->record);
+ RepOriginId origin_id = XLogRecGetOrigin(buf->record);
int i;
TransactionId xid = parsed->twophase_xid;
@@ -790,7 +790,7 @@ DecodeAbort(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
int i;
XLogRecPtr origin_lsn = InvalidXLogRecPtr;
TimestampTz abort_time = parsed->xact_time;
- XLogRecPtr origin_id = XLogRecGetOrigin(buf->record);
+ RepOriginId origin_id = XLogRecGetOrigin(buf->record);
bool skip_xact;
if (parsed->xinfo & XACT_XINFO_HAS_ORIGIN)
Re: Fix incorrect variable type for origin_id
On Tue, Sep 20, 2022 at 02:49:14PM +0900, Masahiko Sawada wrote:
I realized that there are some places where we use XLogRecPtr for
variables for replication origin id. The attached patch fixes them to
use RepOriginiId instead.
Right, good catch. Will fix, thanks!
--
Michael