From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
---|---|
To: | Ashwin Agrawal <aagrawal(at)pivotal(dot)io> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie> |
Subject: | Re: Adding a test for speculative insert abort case |
Date: | 2019-05-16 20:59:47 |
Message-ID: | CAAKRu_ZhkHPpFP1gxNYDvX-M_AGworGgS05eJfxOHp_hYZiDvA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, May 15, 2019 at 10:32 PM Ashwin Agrawal <aagrawal(at)pivotal(dot)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
Attachment | Content-Type | Size |
---|---|---|
0002-Add-test-to-validate-speculative-wait-is-performed.patch | application/octet-stream | 2.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2019-05-16 21:03:41 | Re: Adding a test for speculative insert abort case |
Previous Message | Peter Geoghegan | 2019-05-16 20:11:41 | Re: VACUUM can finish an interrupted nbtree page split -- is that okay? |