Lists: | pgsql-hackers |
---|
From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | radydoug(at)amazon(dot)com |
Subject: | pgbench - add minimal stats on initialization |
Date: | 2019-04-06 16:26:30 |
Message-ID: | alpine.DEB.2.21.1904061810510.3678@lancre |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello devs,
The attached patch adds minimal stats during the initialization phase.
Such a feature was already submitted by Doug Rady two years ago,
https://commitfest.postgresql.org/15/1308/
but it needed to be adapted to the -I custom initialization approach
developed in the same CF, and it ended 'returned with feedback'.
sh> ./pgbench -i -s 3
dropping old tables...
creating tables...
generating data...
100000 of 300000 tuples (33%) done (elapsed 0.09 s, remaining 0.18 s)
200000 of 300000 tuples (66%) done (elapsed 0.20 s, remaining 0.10 s)
300000 of 300000 tuples (100%) done (elapsed 0.32 s, remaining 0.00 s)
vacuuming...
creating primary keys...
done in 0.68 s (drop 0.06 s, create table 0.02 s, generate 0.34 s, vacuum 0.13 s, primary keys 0.13 s).
See the durations on the last line.
The intent is to test the initialization phase more precisely, and
possibly accelerate it. For instance, is it better to do vacuum before or
after primary keys?
--
Fabien.
Attachment | Content-Type | Size |
---|---|---|
pgbench-init-stats-1.patch | text/x-diff | 1.8 KB |
From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | radydoug(at)amazon(dot)com |
Subject: | Re: pgbench - add minimal stats on initialization |
Date: | 2019-04-07 16:22:46 |
Message-ID: | alpine.DEB.2.21.1904071821530.5867@lancre |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
> done in 0.68 s (drop 0.06 s, create table 0.02 s, generate 0.34 s, vacuum
> 0.13 s, primary keys 0.13 s).
>
> See the durations on the last line.
It's even better with working TAP tests.
--
Fabien.
Attachment | Content-Type | Size |
---|---|---|
pgbench-init-stats-2.patch | text/x-diff | 2.7 KB |
From: | Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Fabien Coelho <postgresql(dot)org(at)coelho(dot)net> |
Subject: | Re: pgbench - add minimal stats on initialization |
Date: | 2019-04-10 09:15:47 |
Message-ID: | 155488774705.1505.5520644383655619088.pgcf@coridan.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
The following review has been posted through the commitfest application:
make installcheck-world: tested, failed
Implements feature: tested, failed
Spec compliant: tested, failed
Documentation: not tested
Patch works perfectly and the code is well-written. I have one minor observation that in case of initDropTables you log "drop" and in case of initCreateTables you log "create table". I think you need to be consistent. And why not "drop tables" and "create tables"
The new status of this patch is: Waiting on Author
From: | Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Fabien Coelho <postgresql(dot)org(at)coelho(dot)net> |
Subject: | Re: pgbench - add minimal stats on initialization |
Date: | 2019-04-10 09:17:59 |
Message-ID: | 155488787904.1505.2066097895275672647.pgcf@coridan.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
The following review has been posted through the commitfest application:
make installcheck-world: tested, passed
Implements feature: tested, passed
Spec compliant: tested, passed
Documentation: not tested
Please ignore the last email.
Patch works perfectly and the code is well-written. I have one minor observation that in case of initDropTables you log "drop" and in case of initCreateTables you log "create table". I think you need to be consistent. And why not "drop tables" and "create tables"
The new status of this patch is: Waiting on Author
From: | Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Fabien Coelho <postgresql(dot)org(at)coelho(dot)net> |
Subject: | Re: pgbench - add minimal stats on initialization |
Date: | 2019-04-10 12:58:11 |
Message-ID: | CALtqXTcZF3fTrqx=f2OmghDZuTSUBw1aDi2OZVo1wo1bNpJfEg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi Fabien,
I have one minor observation that in case of initDropTables you log
'drop' and in case of initCreateTables you log 'create table'. We need
to be consistent. The "drop tables" and "create tables" are the best
fit here. Otherwise, the patch is good.
On Wed, Apr 10, 2019 at 2:18 PM Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> wrote:
>
> The following review has been posted through the commitfest application:
> make installcheck-world: tested, passed
> Implements feature: tested, passed
> Spec compliant: tested, passed
> Documentation: not tested
>
> Please ignore the last email.
>
> Patch works perfectly and the code is well-written. I have one minor observation that in case of initDropTables you log "drop" and in case of initCreateTables you log "create table". I think you need to be consistent. And why not "drop tables" and "create tables"
>
> The new status of this patch is: Waiting on Author
--
Ibrar Ahmed
From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgbench - add minimal stats on initialization |
Date: | 2019-04-10 17:39:00 |
Message-ID: | alpine.DEB.2.21.1904101935100.19300@lancre |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hello,
Thanks for the feedback.
> I have one minor observation that in case of initDropTables you log
> 'drop' and in case of initCreateTables you log 'create table'. We need
> to be consistent. The "drop tables" and "create tables" are the best
> fit here.
Ok.
Attached version does that, plus avoids re-assigning "first" on each loop,
plus checks that --no-vacuum indeed removes all vacuums in the TAP test.
--
Fabien.
Attachment | Content-Type | Size |
---|---|---|
pgbench-init-stats-3.patch | text/x-diff | 2.8 KB |
From: | Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Fabien Coelho <postgresql(dot)org(at)coelho(dot)net> |
Subject: | Re: pgbench - add minimal stats on initialization |
Date: | 2019-04-11 12:43:09 |
Message-ID: | 155498658944.1505.11122215173256386387.pgcf@coridan.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
The following review has been posted through the commitfest application:
make installcheck-world: tested, passed
Implements feature: tested, passed
Spec compliant: tested, passed
Documentation: not tested
Patch works fine on my machine.
The new status of this patch is: Ready for Committer
From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Fabien Coelho <postgresql(dot)org(at)coelho(dot)net> |
Subject: | Re: pgbench - add minimal stats on initialization |
Date: | 2019-07-15 23:43:32 |
Message-ID: | CA+hUKGKewEwbzS5k6ugDb86rRVdWO_ih_KFN+OZfiy4B0=Zaqg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Fri, Apr 12, 2019 at 12:44 AM Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> wrote:
> The following review has been posted through the commitfest application:
> make installcheck-world: tested, passed
> Implements feature: tested, passed
> Spec compliant: tested, passed
> Documentation: not tested
>
> Patch works fine on my machine.
>
> The new status of this patch is: Ready for Committer
I spotted one typo, a comma where a semi-colon was wanted:
+ op = "generate",
initGenerateData(con);
break;
I fixed that, ran it through pgindent and committed. Thanks for the
patch and review!
--
Thomas Munro
https://enterprisedb.com