diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index e0e7f53e28..4a800dd4bc 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -1424,9 +1424,8 @@ InvalidatePossiblyObsoleteSlot(ReplicationSlotInvalidationCause cause,
 		SpinLockRelease(&s->mutex);
 
 		/*
-		 * Raise an ERROR if the logical replication slot is invalidating. It
-		 * would not happen because max_slot_wal_keep_size is set to -1 during
-		 * the upgrade, but it stays safe.
+		 * The logical replication slots shouldn't be invalidated as
+		 * max_slot_wal_keep_size is set to -1 during the upgrade.
 		 */
 		if (*invalidated && SlotIsLogical(s) && IsBinaryUpgrade)
 			elog(ERROR, "Replication slots must not be invalidated during the upgrade.");
diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c
index b591b36efe..d083a001f1 100644
--- a/src/bin/pg_upgrade/server.c
+++ b/src/bin/pg_upgrade/server.c
@@ -235,9 +235,9 @@ start_postmaster(ClusterInfo *cluster, bool report_and_exit_on_error)
 	 * crash, the new cluster has to be recreated anyway.  fsync=off is a big
 	 * win on ext4.
 	 *
-	 * Also, the max_slot_wal_keep_size is set to -1 to prevent the WAL removal
-	 * required by logical slots. The setting could avoid the invalidation of
-	 * slots during the upgrade.
+	 * Use max_slot_wal_keep_size as -1 to prevent the WAL removal that is
+	 * required by logical slots.  This would avoid the invalidation of slots
+	 * during the upgrade.
 	 */
 	snprintf(cmd, sizeof(cmd),
 			 "\"%s/pg_ctl\" -w -l \"%s/%s\" -D \"%s\" -o \"-p %d -b%s %s%s\" start",
