Re: Should we add timing output to pg_upgrade?

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Should we add timing output to pg_upgrade?
Date: 2026-12-01 14:43:12
Message-ID: CAN55FZ0-w4fAkCcViV4tr9W6vFqgKNoLYn22atLOi7DxE3ByAg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, 1 Dec 2026 at 08:52, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
> > On Dec 1, 2026, at 09:56, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> >
> > Does it look ok? Or better ideas for time formats? Or objections?
>
> +1 for reporting the duration of each step. The time formats look good to me.

I agree, I think it looks good.

> I don’t see where pg_initialize_timing() is called. Its header comment says it must be called:
> ```
> /*
> * Initialize timing infrastructure
> *
> * This must be called at least once before using INSTR_TIME_SET_CURRENT*
> * macros.
> *
> * If you want to use the TSC clock source in a client program,
> * pg_set_timing_clock_source() needs to also be called.
> */
> extern void pg_initialize_timing(void);

Yes, you are right. Because of this reason, some pg_upgrade tests fail
after applying the patch. I think we can put pg_initialize_timing()
inside of pg_upgrade.c -> main(), this fixes the tests.

--
Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-12-01 15:09:25 Re: Should we add timing output to pg_upgrade?
Previous Message Michael Banck 2026-12-01 14:37:36 Re: reltuples kept decreasing with each autovacuum run Re: BUG #18773