pgsql: Improve more stability of worker_spi termination test

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Improve more stability of worker_spi termination test
Дата
Msg-id E1w9bUw-003BIo-2v@gemulon.postgresql.org
обсуждение
Список pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/283c5fb22b44562428700284aad23eb5245b19d8

Modified Files
--------------
src/test/modules/worker_spi/t/002_worker_terminate.pl | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)


В списке pgsql-committers по дате отправления: