@@ -164,8 +164,8 @@ pglogical_write_begin(StringInfo out, PGLogicalOutputData *data,
164
164
165
165
MtmTransactionRecords = 0 ;
166
166
167
- mtm_log (ProtoTraceTx , "pglogical_write_begin xid=" XID_FMT " sent " ,
168
- txn -> xid );
167
+ mtm_log (ProtoTraceSender , "pglogical_write_begin xid=" XID_FMT " gid=%s " ,
168
+ txn -> xid , txn -> gid );
169
169
}
170
170
171
171
static void pglogical_seq_nextval (StringInfo out , LogicalDecodingContext * ctx , MtmSeqPosition * pos )
@@ -288,6 +288,10 @@ static void
288
288
pglogical_write_insert (StringInfo out , PGLogicalOutputData * data ,
289
289
Relation rel , HeapTuple newtuple )
290
290
{
291
+
292
+ elog (ProtoTraceSender , "pglogical_write_insert %d %d" ,
293
+ MtmIsFilteredTxn , DDLInProgress );
294
+
291
295
if (MtmIsFilteredTxn )
292
296
{
293
297
mtm_log (ProtoTraceFilter , "pglogical_write_insert filtered" );
@@ -405,6 +409,9 @@ pglogical_write_prepare(StringInfo out, PGLogicalOutputData *data,
405
409
{
406
410
uint8 event = * txn -> state_3pc ? PGLOGICAL_PRECOMMIT_PREPARED : PGLOGICAL_PREPARE ;
407
411
412
+ /* Ensure that we reset DDLInProgress */
413
+ Assert (!DDLInProgress );
414
+
408
415
/* COMMIT and PREPARE are preceded by BEGIN, which set MtmIsFilteredTxn flag */
409
416
if (MtmIsFilteredTxn && event == PGLOGICAL_PREPARE )
410
417
return ;
@@ -423,6 +430,8 @@ pglogical_write_prepare(StringInfo out, PGLogicalOutputData *data,
423
430
pq_sendint64 (out , txn -> origin_lsn );
424
431
425
432
pq_sendstring (out , txn -> gid );
433
+
434
+ mtm_log (ProtoTraceSender , "XXX: pglogical_write_prepare %s" , txn -> gid );
426
435
}
427
436
428
437
/*
0 commit comments