Re: pgbench logging broken by time logic changes
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Yugo NAGATA <nagata@sraoss.co.jp>
Cc: Gregory Smith <gregsmithpgsql@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>,
david.christensen@crunchydata.com
Date: 2021-06-16T19:11:41Z
Lists: pgsql-hackers
Attachments
- pgbench-epoch-1.patch (text/x-diff) patch
> pg_time_now(). This uses INSTR_TIME_SET_CURRENT in it, but this macro > can call clock_gettime(CLOCK_MONOTONIC[_RAW], ) instead of gettimeofday > or clock_gettime(CLOCK_REALTIME, ). When CLOCK_MONOTONIC[_RAW] is used, > clock_gettime doesn't return epoch time. Therefore, we can use > INSTR_TIME_SET_CURRENT aiming to calculate a duration, but we should > not have used this to get the current timestamp. > > I think we can fix this issue by using gettimeofday for logging as before > this was changed. I attached the patch. I cannot say that I'm thrilled by having multiple tv stuff back in several place. I can be okay with one, though. What about the attached? Does it make sense? -- Fabien.
Commits
-
Fix pgbench timestamp bugs.
- 5614a0f78eaa 14.0 landed
- 0e39a608ed55 15.0 landed
-
Fix pattern matching logic for logs in TAP tests of pgbench
- 0efd2a1a66dd 11.13 landed
- 79ff96aa9d9a 12.8 landed
- 7a9eaf111ac0 13.4 landed
- c13585fe9e55 14.0 landed
-
pgbench: Improve time logic.
- 547f04e7348b 14.0 cited
-
pgbench: Synchronize client threads.
- aeb57af8e640 14.0 cited
-
pgbench: refactor handling of stats tracking
- b60376649600 9.6.0 cited