On Tue, Dec 30, 2014 at 4:30 AM, FabrÃzio de Royes Mello <[email protected]> wrote: > > > On Sun, Dec 28, 2014 at 12:31 PM, Michael Paquier > <[email protected]> wrote: >> >> Hi all, >> >> While reviewing another patch, I have noticed that >> recovery_min_apply_delay can have a negative value. And the funny part is >> that we actually attempt to apply a delay even in this case, per se this >> condition [email protected]: >> /* nothing to do if no delay configured */ >> if (recovery_min_apply_delay == 0) >> return false; >> Shouldn't we simply leave if recovery_min_apply_delay is lower 0, and not >> only equal to 0? >> > > Seems reasonable. Trivial patch for master and REL9_4_STABLE attached as long as I don't forget it.. -- Michael
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index e5dddd4..5cc7e47 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5430,7 +5430,7 @@ recoveryApplyDelay(XLogReaderState *record) int microsecs; /* nothing to do if no delay configured */ - if (recovery_min_apply_delay == 0) + if (recovery_min_apply_delay <= 0) return false; /*
-- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
