| From: | solai v <solai(dot)cdac(at)gmail(dot)com> |
|---|---|
| To: | Andrew Krylosov <krylosov(dot)andrew(at)gmail(dot)com> |
| Cc: | Rahul Yadav <rahul(at)rhyadav(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, 1950233439(at)qq(dot)com |
| Subject: | Re: BUG #19670: Silent Integer Overflow in time_pl_interval() Returns Wrong Time Value |
| Date: | 2026-10-15 06:29:00 |
| Message-ID: | CAF0whueiNebaEa-imYBDNbK6P2YhovFW5u1UjN1PdkkEaUoeKQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi Rahul
I tested the v1 patch for Bug #19670 on PostgreSQL 19beta1.
Before applying the patch, I was able to reproduce the issue. The
query returned 19:59:04.448383 instead of the expected
04:00:53.999999.
After applying the patch, rebuilding, and restarting the server, the
same query returned the expected result.
I also tested the four boundary cases covering time and timetz
addition and subtraction with extreme interval values. All four
produced the expected results. The regression test suite also passed.
The patch looks good to me based on these results. Reducing the
interval's time component modulo one day before performing the
arithmetic appears to address the overflow.
Thanks for working on this fix.
Regards,
solai
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Manu | 2026-10-15 07:11:27 | Re: VACUUM/ANALYZE double-count the backend's own pending table stats |
| Previous Message | Manu | 2026-10-15 06:21:43 | Re: use-after-free in jsonb_set_lax() |