Fix origin timestamp during decoding of ROLLBACK PREPARED operation.
authorAmit Kapila <akapila@postgresql.org>
Wed, 8 Dec 2021 09:48:56 +0000 (15:18 +0530)
committerAmit Kapila <akapila@postgresql.org>
Wed, 8 Dec 2021 09:48:56 +0000 (15:18 +0530)
This happens because we were passing incorrect arguments to
ReorderBufferFinishPrepared().

Author: Masahiko Sawada
Reviewed-by: Vignesh C
Backpatch-through: 14
Discussion: https://postgr.es/m/CAD21AoBqhUqgDZUhUVnnwKRubPDNJ6m6fJDPgok3E5cWJLL+pA@mail.gmail.com

src/backend/replication/logical/decode.c

index a2b69511b4378f8a3c8cdc70ec7b5daf02ed36d9..59aed6cee6ca55068af74e7ba349fe7d7207b6c9 100644 (file)
@@ -875,8 +875,8 @@ DecodeAbort(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
    if (two_phase && !skip_xact)
    {
        ReorderBufferFinishPrepared(ctx->reorder, xid, buf->origptr, buf->endptr,
-                                   abort_time, origin_id, origin_lsn,
                                    InvalidXLogRecPtr,
+                                   abort_time, origin_id, origin_lsn,
                                    parsed->twophase_gid, false);
    }
    else