PATCH: pgbench - break out timing data for initialization phases

Started by Rady, Dougalmost 9 years ago3 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t37468
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 27, 2026 at 10:08 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t37468_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t37468_1 && git checkout t37468_1

Patchset v1 (message #1) is on t37468_1

Jump to latest
#1Rady, Doug
radydoug@amazon.com

This patch is based against 'master'.

It adds collection of timing data for the initialization option phases and
reporting at the end of initialization.

Before patch:
.
.
.
199900000 of 200000000 tuples (99%) done (elapsed 158.96 s, remaining 0.08 s)
200000000 of 200000000 tuples (100%) done (elapsed 159.04 s, remaining 0.00 s)
vacuum...
set primary keys...
done.

After patch:
.
.
.
199900000 of 200000000 tuples (99%) done (elapsed 161.48 s, remaining 0.08 s)
200000000 of 200000000 tuples (100%) done (elapsed 161.56 s, remaining 0.00 s)
vacuum...
set primary keys...
total time: 316.03 s (insert 161.60 s, commit 0.64 s, vacuum 60.77 s, index 93.01 s)
done.

doug
--
Doug Rady
Amazon Aurora PostgreSQL
radydoug@amazon.com

Attachments:

t37468_1
pgbench-init-timing.patchapplication/octet-stream; name=pgbench-init-timing.patchDownload+33-1
#2Fabien COELHO
coelho@cri.ensmp.fr
In reply to: Rady, Doug (#1)
Re: PATCH: pgbench - break out timing data for initialization phases

Hello Doug,

total time: 316.03 s (insert 161.60 s, commit 0.64 s, vacuum 60.77 s, index 93.01 s)

Definitely interesting.

There is a "ready for committers" patch in the CF which extensively rework
the initialization: it becomes customizable, and this approach may not
work as is after that...

Maybe you could investigate how it may be implemented on top of that?

Either show times when the phases are performed computed, or maybe use
some auxiliary data structure to keep the information (hmmm...).

--
Fabien.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Michael Paquier
michael@paquier.xyz
In reply to: Fabien COELHO (#2)
Re: [HACKERS] PATCH: pgbench - break out timing data for initialization phases

On Tue, Sep 26, 2017 at 3:07 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:

Hello Doug,

total time: 316.03 s (insert 161.60 s, commit 0.64 s, vacuum 60.77 s,
index 93.01 s)

Definitely interesting.

There is a "ready for committers" patch in the CF which extensively rework
the initialization: it becomes customizable, and this approach may not work
as is after that...

Maybe you could investigate how it may be implemented on top of that?

Either show times when the phases are performed computed, or maybe use some
auxiliary data structure to keep the information (hmmm...).

The patch needs as well a rebase, I am marking it as returned with
feedback per lack of activity. When sending a new version, please make
sure to:
- reply to the feedback which has been provided previously.
- register a new version of the patch in the commit fest app.
Thanks,
--
Michael