• Tom Lane's avatar
    isolationtester: don't repeat the is-it-waiting query when retrying a step. · 9c9782f0
    Tom Lane authored
    If we're retrying a step, then we already decided it was blocked on a lock,
    and there's no need to recheck that.  The original coding of commit
    38f8bdca resulted in a large number of
    is-it-waiting queries when dealing with multiple concurrently-blocked
    sessions, which is fairly pointless and also results in test failures in
    CLOBBER_CACHE_ALWAYS builds, where the is-it-waiting query is quite slow.
    
    This definition also permits appending pg_sleep() calls to steps where it's
    needed to control the order of finish of concurrent steps.  Before, that
    did not work nicely because we'd decide that a step performing a sleep was
    not blocked and hang up waiting for it to finish, rather than noticing the
    completion of the concurrent step we're supposed to notice first.
    
    In passing, revise handling of removal of completed waiting steps
    to make it a bit less messy.
    9c9782f0
isolationtester.c 22.6 KB