• Tom Lane's avatar
    Split up a couple of long-running regression test scripts. · 385d396b
    Tom Lane authored
    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
    385d396b
join.out 203 KB