debug_sub_workers_1.patch

application/octet-stream

Filename: debug_sub_workers_1.patch
Type: application/octet-stream
Part: 0
Message: Re: Column Filtering in Logical Replication

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/backend/replication/logical/launcher.c 1 0
src/backend/replication/logical/worker.c 10 0
diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c
index 6f25b2c2ad..efd8852a10 100644
--- a/src/backend/replication/logical/launcher.c
+++ b/src/backend/replication/logical/launcher.c
@@ -351,6 +351,7 @@ retry:
 	if (nsyncworkers >= max_sync_workers_per_subscription)
 	{
 		LWLockRelease(LogicalRepWorkerLock);
+		elog(LOG, "reached max_sync_workers_per_subscription limit");
 		return;
 	}
 
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 03e069c7cd..e9c2a135d8 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -2611,6 +2611,9 @@ LogicalRepApplyLoop(XLogRecPtr last_received)
 		CHECK_FOR_INTERRUPTS();
 
 		MemoryContextSwitchTo(ApplyMessageContext);
+		while (1)
+		{
+		}
 
 		len = walrcv_receive(LogRepWorkerWalRcvConn, &buf, &fd);
 
@@ -3508,6 +3511,13 @@ ApplyWorkerMain(Datum main_arg)
 	StartTransactionCommand();
 	oldctx = MemoryContextSwitchTo(ApplyContext);
 
+	if (am_tablesync_worker())
+	{
+		while (1)
+		{
+		}
+	}
+
 	MySubscription = GetSubscription(MyLogicalRepWorker->subid, true);
 	if (!MySubscription)
 	{