| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> | 
|---|---|
| To: | Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> | 
| Cc: | Gregory Smith <gregsmithpgsql(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, david(dot)christensen(at)crunchydata(dot)com | 
| Subject: | Re: pgbench logging broken by time logic changes | 
| Date: | 2021-06-16 19:11:41 | 
| Message-ID: | alpine.DEB.2.22.394.2106162102030.2407635@pseudo | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> 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.
| Attachment | Content-Type | Size | 
|---|---|---|
| pgbench-epoch-1.patch | text/x-diff | 538 bytes | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2021-06-16 19:12:23 | Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic | 
| Previous Message | Peter Geoghegan | 2021-06-16 19:08:18 | Re: snapshot too old issues, first around wraparound and then more. |