| From: | cca5507 <cca5507(at)qq(dot)com> |
|---|---|
| To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | Xuneng Zhou <xunengzhou(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
| Subject: | Re: timeout value overflow in wait for lsn |
| Date: | 2026-08-28 09:11:28 |
| Message-ID: | tencent_E0E142ED4F0A930C349EF9C1B99D5CA84B06@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| v4-0001-Fix-WAIT-FOR-LSN-timeout-handling.patch | application/octet-stream | 4.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bertrand Drouvot | 2026-08-28 09:24:17 | Re: Offline data checksum changes can cause incorrect checksum state on standbys |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-08-28 09:04:58 | RE: 019_replslot_limit.pl might fail due to checkpoint skipped |