| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us> |
| Cc: | James <im-james(at)hotmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: [PATCHES] BUG #2569: statement_timeout bug on Windows |
| Date: | 2006-08-09 20:10:38 |
| Message-ID: | 28850.1155154238@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-hackers pgsql-patches |
Bruce Momjian <bruce(at)momjian(dot)us> writes:
! /* WaitForSingleObjectEx() uses milliseconds */
> ! waittime = timerCommArea.value.it_value.tv_usec / 1000 + timerCommArea.value.it_value.tv_sec * 1000;
Seems like this probably ought to round up not down:
waittime = (timerCommArea.value.it_value.tv_usec + 999) / 1000 + timerCommArea.value.it_value.tv_sec * 1000;
Otherwise, an attempt to wait for 100 usec would convert to waittime 0,
which seems like a bad thing. In general the semantics of timed waits
are always supposed to be "you wait at least this long".
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2006-08-09 20:41:26 | Re: [PATCHES] BUG #2569: statement_timeout bug on Windows |
| Previous Message | Jim Nasby | 2006-08-09 18:25:38 | Re: BUG #2558: initDB failed to run |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Hammond | 2006-08-09 20:14:37 | Re: 8.2 features status |
| Previous Message | Tom Lane | 2006-08-09 20:04:49 | Re: remote query debugging was: Plugins redux |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-08-09 20:17:02 | Re: Maintaining cluster order on insert |
| Previous Message | Tom Lane | 2006-08-09 20:04:49 | Re: remote query debugging was: Plugins redux |