pgsql: Split up a couple of long-running regression test scripts. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Split up a couple of long-running regression test scripts.
Date
Msg-id E1hEg7D-0003rg-Lt@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Move plpgsql error-trapping tests to a new module-specifictest
Next
From: Tom Lane
Date:
Subject: pgsql: Speed up sort-order-comparison tests in create_index_spgist.