diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-04-11 08:59:40 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-04-11 08:59:40 -0400 |
commit | feffa0e0795a5a99324890a6dd548ba162ec104c (patch) | |
tree | 4ae89120ec4b5c51a3072b08dcdedc9598262b72 /contrib/postgres_fdw/postgres_fdw.c | |
parent | a6940bdcb9ef87a54459deac5699a61cfdbc696c (diff) | |
download | postgresql-feffa0e0795a5a99324890a6dd548ba162ec104c.tar.gz postgresql-feffa0e0795a5a99324890a6dd548ba162ec104c.zip |
Fix pgbench's --progress-timestamp option to print Unix-epoch timestamps.
As a consequence of commit 1d63f7d2d, on platforms with CLOCK_MONOTONIC,
you got some random timescale or other instead of standard Unix timestamps
as expected. I'd attempted to fix pgbench for that change in commits
74baa1e3b and 67a875355, but missed this place. Fix in the same way as
those previous commits, ie, just eat the cost of an extra gettimeofday();
one extra syscall per progress report isn't worth sweating over. Per
report from Jeff Janes.
In passing, use snprintf not sprintf for this purpose. I don't think
there'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.com
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions