pgsql: isolationtester: don't repeat the is-it-waiting query when retry

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: isolationtester: don't repeat the is-it-waiting query when retry
Дата
Msg-id E1aUJGA-00006m-OA@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
isolationtester: don't repeat the is-it-waiting query when retrying a step.

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
38f8bdcac4982215beb9f65a19debecaf22fd470 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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9c9782f066e0ce5424b8706df2cce147cb78170f

Modified Files
--------------
src/test/isolation/isolationtester.c | 53 ++++++++++++++++++++----------------
1 file changed, 29 insertions(+), 24 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Still further tweaking of deadlock isolation tests.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: pgbench: fix segfault with empty sql file