diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 2e12baf8eb..64d3c59709 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -2229,14 +2229,30 @@ vacuum_delay_point(void)
 	/* Nap if appropriate */
 	if (msec > 0)
 	{
+		/*
+		 * Since WaitLatch can only wait in units of milliseconds, carry any
+		 * residual fractional msec in a static variable, and accumulate it to
+		 * add into the wait interval next time.
+		 */
+		static double residual_msec = 0;
+		long		lmsec;
+
+		msec += residual_msec;
+
 		if (msec > VacuumCostDelay * 4)
 			msec = VacuumCostDelay * 4;
 
-		(void) WaitLatch(MyLatch,
-						 WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
-						 msec,
-						 WAIT_EVENT_VACUUM_DELAY);
-		ResetLatch(MyLatch);
+		lmsec = floor(msec);
+		residual_msec = msec - lmsec;
+
+		if (lmsec > 0)
+		{
+			(void) WaitLatch(MyLatch,
+							 WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH,
+							 lmsec,
+							 WAIT_EVENT_VACUUM_DELAY);
+			ResetLatch(MyLatch);
+		}
 
 		VacuumCostBalance = 0;
 
