diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c index c4ba24a7608..edad7efb12f 100644 --- a/contrib/pg_standby/pg_standby.c +++ b/contrib/pg_standby/pg_standby.c @@ -400,7 +400,7 @@ RestoreWALFileForRecovery(void) fflush(stderr); } - while (numretries < maxretries) + while (numretries <= maxretries) { rc = system(restoreCommand); if (rc == 0)