Skip to content

Commit 3964400

Browse files
committed
prepared.out should look like that
1 parent 2d76a09 commit 3964400

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

contrib/test_decoding/expected/prepared.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ SELECT data FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'in
9191
BEGIN
9292
table public.test_prepared2: INSERT: id[integer]:7
9393
COMMIT
94+
COMMIT PREPARED 'test_prepared#3'
9495
BEGIN
9596
table public.test_prepared1: INSERT: id[integer]:8 data[text]:null
9697
COMMIT

src/backend/replication/logical/reorderbuffer.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,6 +1719,8 @@ ReorderBufferPrepare(ReorderBuffer *rb, TransactionId xid,
17191719
txn->prepared = true;
17201720
strcpy(txn->gid, gid);
17211721

1722+
fprintf(stderr, "ReorderBufferPrepare xid = %d, found = %d\n", xid, txn == NULL ? 42 : txn->prepared);
1723+
17221724
ReorderBufferCommitInternal(txn, rb, xid, commit_lsn, end_lsn,
17231725
commit_time, origin_id, origin_lsn);
17241726
}
@@ -1735,6 +1737,8 @@ ReorderBufferTxnIsPrepared(ReorderBuffer *rb, TransactionId xid)
17351737
txn = ReorderBufferTXNByXid(rb, xid, false, NULL, InvalidXLogRecPtr,
17361738
false);
17371739

1740+
fprintf(stderr, "ReorderBufferTxnIsPrepared xid = %d, found = %d\n", xid, txn == NULL ? 42 : txn->prepared);
1741+
17381742
return txn == NULL ? true : txn->prepared;
17391743
}
17401744

0 commit comments

Comments
 (0)