Re: timeout value overflow in wait for lsn - Mailing list pgsql-hackers

From cca5507
Subject Re: timeout value overflow in wait for lsn
Date
Msg-id tencent_E0E142ED4F0A930C349EF9C1B99D5CA84B06@qq.com
Whole thread
In response to Re: timeout value overflow in wait for lsn  (Xuneng Zhou <xunengzhou@gmail.com>)
Responses Re: timeout value overflow in wait for lsn
List pgsql-hackers
> 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

pgsql-hackers by date:

Previous
From: Tender Wang
Date:
Subject: Re: [PATCH] Fix disabled_nodes propagation for single-child Append paths
Next
From: Bertrand Drouvot
Date:
Subject: Re: Offline data checksum changes can cause incorrect checksum state on standbys