v92_0001_amit.patch.txt

text/plain

Filename: v92_0001_amit.patch.txt
Type: text/plain
Part: 0
Message: Re: Synchronizing slots from primary to standby
diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c
index d139d53173..c133fed6c2 100644
--- a/src/backend/replication/logical/slotsync.c
+++ b/src/backend/replication/logical/slotsync.c
@@ -1389,7 +1389,7 @@ ShutDownSlotSync(void)
 /*
  * SlotSyncWorkerCanRestart
  *
- * Returns true if enough time has passed (SLOTSYNC_RESTART_INTERVAL_SEC)
+ * Returns true if enough time (SLOTSYNC_RESTART_INTERVAL_SEC) has passed
  * since it was launched last. Otherwise returns false.
  *
  * This is a safety valve to protect against continuous respawn attempts if the
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index a2269c46f7..7e9bdf9e33 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -1242,14 +1242,13 @@ restart:
 		 * happening here. The persistent synced slots are thus safe but there
 		 * is a possibility that the slot sync worker has created a temporary
 		 * slot (which stays active even on release) and we are trying to drop
-		 * the same here. In practice, the chances of hitting this scenario is
-		 * very less as during slot synchronization, the temporary slot is
-		 * immediately converted to persistent and thus is safe due to the
-		 * shared lock taken on the database. So for the time being, we'll
-		 * just bail out in such a scenario.
+		 * the here. In practice, the chances of hitting this scenario are less
+		 * as during slot synchronization, the temporary slot is immediately
+		 * converted to persistent and thus is safe due to the shared lock
+		 * taken on the database. So, we'll just bail out in such a case.
 		 *
-		 * XXX: If needed, we can consider shutting down slot sync worker
-		 * before trying to drop synced temporary slots here.
+		 * XXX: We can consider shutting down the slot sync worker before
+		 * trying to drop synced temporary slots here.
 		 */
 		if (active_pid)
 			ereport(ERROR,