> I found another issue around timeout value handling: if we specify a
> timeout in [-0.5, 0.5], the WAIT FOR command waits forever. A negative
> timeout in [-0.5, 0) should be rejected. ISTM a timeout in (0, 0.5] is
> rounded down to 0, disabling the timeout essentially, which would
> surprise users. I think we can either round up timeout in (0, 1] to 1,
> or reject sub-millisecond values. I think we can fix both in the same
> patch that fixes the overflow issue.

Good catch! Fixed by moving the negative check before rint() and rounding
timeout in (0, 1) to 1.

Please see the v4 patch.

--
Regards,
ChangAo Chen

Attachment: v4-0001-Fix-WAIT-FOR-LSN-timeout-handling.patch
Description: Binary data

Reply via email to