diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index 7a6c594..b05d811 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -2322,6 +2322,15 @@ LogicalRepApplyLoop(XLogRecPtr last_received) bool ping_sent = false; TimeLineID tli; + /* + * Give the tablesync worker an opportunity see if it can exit instead of + * handling messages which the apply worker could just handle by itself. + */ + if (am_tablesync_worker()) + { + process_syncing_tables(last_received); + } + /* * Init the ApplyMessageContext which we clean up after each replication * protocol message.