aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/syscat.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-01-01 15:17:08 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-01-01 15:17:08 -0500
commit74baa1e3b89c1651ade1afeffc715cac24041e2f (patch)
tree72c3fe279a9f78c4c17b2ac19f9744bbfe62b543 /src/tutorial/syscat.source
parent257d8157205a7be5f9799e8941b922521d678a25 (diff)
downloadpostgresql-74baa1e3b89c1651ade1afeffc715cac24041e2f.tar.gz
postgresql-74baa1e3b89c1651ade1afeffc715cac24041e2f.zip
Avoid assuming that instr_time == struct timeval in pgbench logging.
This code was presuming undue familiarity with the contents of the instr_time struct. That was already broken on Windows, and it's about to get broken on most other platforms as well. The simplest solution that preserves the current output definition is to just do our own gettimeofday() call here. Realistically, the extra cost is probably negligible in comparison to everything else that's going on in a pgbench transaction, so it's not worth sweating over. On Windows, the precision delivered by gettimeofday() is lower than one could wish, but this is still a big improvement over printing zeroes, as the code did before. Discussion: https://postgr.es/m/8837.1483216839@sss.pgh.pa.us
Diffstat (limited to 'src/tutorial/syscat.source')
0 files changed, 0 insertions, 0 deletions