diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index 5186ad2..8dad183 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -2202,6 +2202,7 @@ ReorderBufferProcessTXN(ReorderBuffer *rb, ReorderBufferTXN *txn, ReorderBufferChange *volatile specinsert = NULL; volatile bool stream_started = false; ReorderBufferTXN *volatile curtxn = NULL; + bool debug_inserting = false; /* build data to be able to lookup the CommandIds of catalog tuples */ ReorderBufferBuildTupleCidHash(rb, txn); @@ -2358,6 +2359,12 @@ ReorderBufferProcessTXN(ReorderBuffer *rb, ReorderBufferTXN *txn, if (relation->rd_rel->relkind == RELKIND_SEQUENCE) goto change_done; + if (!debug_inserting) + { + debug_inserting = true; + elog(NOTICE, "XXX start inserting. Time " UINT64_FORMAT, GetCurrentTimestamp()); + } + /* user-triggered change */ if (!IsToastRelation(relation)) { @@ -2503,6 +2510,12 @@ ReorderBufferProcessTXN(ReorderBuffer *rb, ReorderBufferTXN *txn, break; case REORDER_BUFFER_CHANGE_INVALIDATION: + if (debug_inserting) + { + debug_inserting = false; + elog(NOTICE, "XXX start invalidating. Time " UINT64_FORMAT, GetCurrentTimestamp()); + } + /* Execute the invalidation messages locally */ ReorderBufferExecuteInvalidations(change->data.inval.ninvalidations, change->data.inval.invalidations); @@ -2760,6 +2773,8 @@ ReorderBufferProcessTXN(ReorderBuffer *rb, ReorderBufferTXN *txn, } } PG_END_TRY(); + + elog(NOTICE, "XXX finish processing. Time " UINT64_FORMAT, GetCurrentTimestamp()); } /*