pgsql: Add isolation test for INSERT ON CONFLICT speculative insertion

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add isolation test for INSERT ON CONFLICT speculative insertion
Date: 2019-05-14 19:06:44
Message-ID: E1hQclA-0008UJ-Ks@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add isolation test for INSERT ON CONFLICT speculative insertion failure.

This path previously was not reliably covered. There was some
heuristic coverage via insert-conflict-toast.spec, but that test is
not deterministic, and only tested for a somewhat specific bug.

Backpatch, as this is a complicated and otherwise untested code
path. Unfortunately 9.5 cannot handle two waiting sessions, and thus
cannot execute this test.

Triggered by a conversion with Melanie Plageman.

Author: Andres Freund
Discussion: https://postgr.es/m/CAAKRu_a7hbyrk=wveHYhr4LbcRnRCG=yPUVoQYB9YO1CdUBE9Q@mail.gmail.com
Backpatch: 9.5-

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0491a51fdd4e87fd5ab42ae42dfb9931cac681f6

Modified Files
--------------
.../expected/insert-conflict-specconflict.out | 179 +++++++++++++++++++++
src/test/isolation/isolation_schedule | 1 +
.../specs/insert-conflict-specconflict.spec | 149 +++++++++++++++++
3 files changed, 329 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2019-05-14 19:21:38 pgsql: Handle table_complete_speculative's succeeded argument as docume
Previous Message Andres Freund 2019-05-14 19:06:43 pgsql: Add isolation test for INSERT ON CONFLICT speculative insertion