pgsql: Still further tweaking of deadlock isolation tests.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Still further tweaking of deadlock isolation tests.
Date: 2016-02-12 19:20:06
Message-ID: E1aUJGA-00006n-O7@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Still further tweaking of deadlock isolation tests.

It turns out that there is a second race condition in the new deadlock-hard
test: once the deadlock detector fires, it's uncertain whether step s7a8 or
step s8a1 will report first, because killing s8's transaction unblocks s7.
So far, s7 has only been seen to report first in CLOBBER_CACHE_ALWAYS
builds, but it's pretty reproducible there, and in theory it should
sometimes occur in normal builds too. If s7 were a bit slower than usual,
that could also break the test, since the existing expected-file assumes
that we'll see s7a8 report the first time we check it after s8a1 completes.
To fix, add a post-lock delay to s7a8.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d03130d378b5fb071d231a7822784ad87268583a

Modified Files
--------------
src/test/isolation/expected/deadlock-hard.out | 9 ++++++---
src/test/isolation/specs/deadlock-hard.spec | 6 ++++--
2 files changed, 10 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2016-02-12 20:15:41 pgsql: pgbench: fix segfault with empty sql file
Previous Message Tom Lane 2016-02-12 18:36:21 pgsql: Re-pgindent isolationtester.c.