Re: Fixing pgbench's logging of transaction timestamps

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixing pgbench's logging of transaction timestamps
Date: 2017-01-01 20:22:13
Message-ID: 18059.1483302133@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
>> 3. Forget about using the instr_time result and just have doLog() execute
>> gettimeofday() to obtain the timestamp to print. This is kind of
>> conceptually ugly, but realistically the added overhead is probably
>> insignificant. A larger objection might be that on Windows, the result
>> of gettimeofday() isn't very high precision ... but it'd still be a huge
>> improvement over the non-answer you get now.

> Yep.

>> I'm inclined to think that #2 isn't a very good choice; it appears to
>> preserve the current behavior but really doesn't. So we should either
>> change the behavior as in #1 or expend an extra system call as in #3.
>> Preferences?

> Marginal preference for #3 for KIS? Otherwise any three options seems
> better than the current status.

OK, done that way.

BTW, why is it that the --aggregate-interval option is unsupported on
Windows? Is that an artifact of the same disease of assuming too much
about how instr_time is represented? I don't see any very good reason
for it other than the weird decision to store the result of
INSTR_TIME_GET_DOUBLE in a "long", which seems rather broken in any case.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2017-01-01 21:14:57 Re: Proposal for changes to recovery.conf API
Previous Message Pavel Stehule 2017-01-01 18:17:56 Re: merging some features from plpgsql2 project