postgres-github.git / summary / log / commit / refs

commit    283c5fb22b44562428700284aad23eb5245b19d8
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Mon Apr 06 04:23:28 2026 +0000

    Improve more stability of worker_spi termination test
    
    Alexander Lakhin has noticed that it can be possible on machines with
    slow storage to have the spawned workers be stuck in
    initialize_worker_spi(), before they reach their main loop.  Waiting for
    a flush to happen would block the interrupt attempts done by the
    database commands, causing the test to fail on timeout once the number
    of interrupt attempts is reached in CountOtherDBBackends().
    
    This commit switches the test to wait for the spawned bgworkers to reach
    their main loops before attempting the database commands that would
    trigger the interrupts, napping for a time larger than the default, with
    worker_spi.naptime set at 10 minutes.  Another thing that could be
    attempted is to enforce a larger number of tries in
    CountOtherDBBackends(), if what is done here is not enough.  Let's see
    first if what this commit does is enough for the buildfarm members
    widowbird and jay.
    
    Analyzed-by: Alexander Lakhin <exclusion@gmail.com>
    Discussion: https://postgr.es/m/f913fba1-da59-404c-9eb3-07c7304be637@gmail.com

[parent: d78a4f0bf058]