- Notifications
You must be signed in to change notification settings - Fork5
Commitfeffa0e
committed
Fix pgbench's --progress-timestamp option to print Unix-epoch timestamps.
As a consequence of commit1d63f7d, on platforms with CLOCK_MONOTONIC,you got some random timescale or other instead of standard Unix timestampsas expected. I'd attempted to fix pgbench for that change in commits74baa1e and67a8753, but missed this place. Fix in the same way asthose previous commits, ie, just eat the cost of an extra gettimeofday();one extra syscall per progress report isn't worth sweating over. Perreport from Jeff Janes.In passing, use snprintf not sprintf for this purpose. I don't thinkthere's any chance of actual buffer overrun, but it just looks safer.Discussion:https://postgr.es/m/CAMkU=1zrQaPwBN+NcBd3pWCb=vWaiL=mmWfJjDJjh-a7eVr-Og@mail.gmail.com1 parenta6940bd commitfeffa0e
1 file changed
+14
-3
lines changedLines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4652 | 4652 |
| |
4653 | 4653 |
| |
4654 | 4654 |
| |
4655 |
| - | |
4656 |
| - | |
| 4655 | + | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
4657 | 4668 |
| |
4658 |
| - | |
| 4669 | + | |
4659 | 4670 |
| |
4660 | 4671 |
| |
4661 | 4672 |
| |
|
0 commit comments
Comments
(0)