Re: Adding a test for speculative insert abort case
Melanie Plageman <melanieplageman@gmail.com>
From: Melanie Plageman <melanieplageman@gmail.com>
To: Ashwin Agrawal <aagrawal@pivotal.io>
Cc: Andres Freund <andres@anarazel.de>,
Pg Hackers <pgsql-hackers@postgresql.org>, Peter Geoghegan <pg@bowt.ie>
Date: 2019-05-16T20:59:47Z
Lists: pgsql-hackers
Attachments
- 0002-Add-test-to-validate-speculative-wait-is-performed.patch (application/octet-stream) patch 0002
On Wed, May 15, 2019 at 10:32 PM Ashwin Agrawal <aagrawal@pivotal.io> wrote: > > The second index would help to hold the session after inserting the tuple > in unique index but before completing the speculative insert. Hence, helps > to create the condition easily. I believe order of index insertion is > helping here that unique index is inserted and then non-unique index is > inserted too. > > Oh, cool. I didn't know that execution order would be guaranteed for which index to insert into first. > Attaching patch with the test using the idea Andres mentioned and it works > to excercise the speculative wait. > > It looks good. I thought it would be helpful to mention why you have s1 create the non-unique index after the permutation has begun. You don't want this index to influence the behavior of the other permutations--this part makes sense. However, why have s1 do it instead of the controller? I added a couple suggested changes to the comments in the permutation in the version in the patch I attached. Note that I did not update the answer files. (These suggested changes to comments are in distinct from and would be in addition to the suggestions I had for the wording of the comments overall in the above email I sent). -- Melanie Plageman
Commits
-
Test additional speculative conflict scenarios.
- 43e08419708a 13.0 landed
-
Add isolation test for INSERT ON CONFLICT speculative insertion failure.
- 0491a51fdd4e 9.6.14 landed
- 04595960a0a7 10.9 landed
- 05cf41973157 11.4 landed
- 08e2edc0767a 12.0 landed