From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Split up a couple of long-running regression test scripts.
Date: Thu, 11 Apr 2019 20:16:07 +0000
Message-ID: <E1hEg7D-0003rg-Lt@gemulon.postgresql.org> (raw)
Split up a couple of long-running regression test scripts.
The point of this change is to increase the potential for parallelism
while running the core regression tests. Most people these days are
using parallel testing modes on multi-core machines, so we might as
well try a bit harder to keep multiple cores busy. Hence, a test that
runs much longer than others in its parallel group is a candidate to
be sub-divided.
In this patch, create_index.sql and join.sql are split up.
I haven't changed the content of the tests in any way, just
moved them.
I moved create_index.sql's SP-GiST-related tests into a new script
create_index_spgist, and moved its btree multilevel page deletion test
over to the existing script btree_index. (btree_index is a more natural
home for that test, and it's shorter than others in its parallel group,
so this doesn't hurt total runtime of that group.) There might be
room for more aggressive splitting of create_index, but this is enough
to improve matters considerably.
Likewise, I moved join.sql's "exercises for the hash join code" into
a new file join_hash. Those exercises contributed three-quarters of
the script's runtime. Which might well be excessive ... but for the
moment, I'm satisfied with shoving them into a different parallel
group, where they can share runtime with the roughly-equally-lengthy
gist test.
(Note for anybody following along at home: there are interesting
interactions between the runtimes of create_index and anything running
in parallel with it, because the tests of CREATE INDEX CONCURRENTLY
in that file will repeatedly block waiting for concurrent transactions
to commit. As committed in this patch, create_index and
create_index_spgist have roughly equal runtimes, but that's mostly an
artifact of forced synchronization of the CONCURRENTLY tests; when run
serially, create_index is much faster. A followup patch will reduce
the runtime of create_index_spgist and thereby also create_index.)
Discussion: https://postgr.es/m/735.1554935715@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/385d396b807bdd7034ad3d0cea3c921d7cb04faa
Modified Files
--------------
src/test/regress/expected/btree_index.out | 18 +
src/test/regress/expected/create_index.out | 1778 +++------------------
src/test/regress/expected/create_index_spgist.out | 1305 +++++++++++++++
src/test/regress/expected/join.out | 880 ----------
src/test/regress/expected/join_hash.out | 880 ++++++++++
src/test/regress/expected/sanity_check.out | 1 -
src/test/regress/parallel_schedule | 4 +-
src/test/regress/serial_schedule | 2 +
src/test/regress/sql/btree_index.sql | 20 +
src/test/regress/sql/create_index.sql | 424 +----
src/test/regress/sql/create_index_spgist.sql | 421 +++++
src/test/regress/sql/join.sql | 470 ------
src/test/regress/sql/join_hash.sql | 469 ++++++
13 files changed, 3353 insertions(+), 3319 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Split up a couple of long-running regression test scripts.
In-Reply-To: <E1hEg7D-0003rg-Lt@gemulon.postgresql.org>
References: <E1hEg7D-0003rg-Lt@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox