Re: Error on pgbench logs

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, rulyox(at)gmail(dot)com, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Error on pgbench logs
Date: 2021-06-12 18:27:42
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, 10 Jun 2021 23:29:30 +0200 (CEST)
Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:

> Bonjour Michaël,
> Here is an updated patch. While having a look at Kyotaro-san patch, I
> noticed that the aggregate stuff did not print the last aggregate. I think
> that it is a side effect of switching the precision from per-second to
> per-µs. I've done an attempt at also fixing that which seems to work.

This is just out of curiosity.

+ while ((next = agg->start_time + agg_interval * INT64CONST(1000000)) <= now)

I can find the similar code to convert "seconds" to "us" using casting like

end_time = threads[0].create_time + (int64) 1000000 * duration;


next_report = last_report + (int64) 1000000 * progress;

Is there a reason use INT64CONST instead of (int64)? Do these imply the same effect?

Sorry, if this is a dumb question...

Yugo Nagata

Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-06-12 18:27:43 Re: A new function to wait for the backend exit after termination
Previous Message Yugo NAGATA 2021-06-12 18:07:51 Re: Error on pgbench logs