v67-0001-changes_amit_1.patch

application/octet-stream

Filename: v67-0001-changes_amit_1.patch
Type: application/octet-stream
Part: 1
Message: Re: Perform streaming logical transactions by background workers and parallel apply

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
Series: patch v67-0001
File+
src/backend/replication/logical/applyparallelworker.c 4 4
diff --git a/src/backend/replication/logical/applyparallelworker.c b/src/backend/replication/logical/applyparallelworker.c
index f8a0bb462a..2071fca01b 100644
--- a/src/backend/replication/logical/applyparallelworker.c
+++ b/src/backend/replication/logical/applyparallelworker.c
@@ -486,10 +486,10 @@ pa_allocate_worker(TransactionId xid)
 	}
 
 	/*
-	 * It's necessary to reread the subscription information before assigning
-	 * the transaction to a parallel apply worker. Otherwise, the leader may
-	 * not be able to reread the subscription information if streaming
-	 * transactions keep coming and are handled by parallel apply workers.
+	 * It is good to check for any change in the subscription parameter to
+	 * avoid the case where for a very long time the change doesn't get
+	 * reflected. This can happen when there is a constant flow of streaming
+	 * transactions that are handled by parallel apply workers.
 	 */
 	maybe_reread_subscription();