add timing information to pg_upgrade

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: add timing information to pg_upgrade
Date: 2023-07-27 23:51:34
Message-ID: 20230727235134.GA3658499@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've been looking into some options for reducing the amount of downtime
required for pg_upgrade, and $SUBJECT seemed like something that would be
worthwhile independent of that effort. The attached work-in-progress patch
adds the elapsed time spent in each step, which looks like this:

Performing Consistency Checks
-----------------------------
Checking cluster versions ok (took 0 ms)
Checking database user is the install user ok (took 3 ms)
Checking database connection settings ok (took 4 ms)
Checking for prepared transactions ok (took 2 ms)
Checking for system-defined composite types in user tables ok (took 82 ms)
Checking for reg* data types in user tables ok (took 55 ms)
...

This information can be used to better understand where the time is going
and to validate future improvements. I'm open to suggestions on formatting
the timing information, assuming folks are interested in this idea.

Thoughts?

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v1-0001-add-timing-information-to-pg_upgrade.patch text/x-diff 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2023-07-27 23:57:06 Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication
Previous Message Nathan Bossart 2023-07-27 23:14:41 Re: Fwd: BUG #18016: REINDEX TABLE failure