Re: Decoding speculative insert with toast leaks memory - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Decoding speculative insert with toast leaks memory
Date
Msg-id CAFiTN-v5Fvn3=pwAY8PH9jPMYcENzzESZG701WRecKe89=1+ZQ@mail.gmail.com
Whole thread Raw
In response to Re: Decoding speculative insert with toast leaks memory  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: Decoding speculative insert with toast leaks memory
List pgsql-hackers
On Mon, Jun 7, 2021 at 6:45 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:

>>
>>
>> 2. In the test, there seems to be an assumption that we can unlock s2
>> and s3 one after another, and then both will start waiting on s-1 but
>> isn't it possible that before s2 start waiting on s1, s3 completes its
>> insertion and then s2 will never proceed for speculative insertion?
>
>
> I agree, such race conditions are possible.  Currently, I am not able to think what we can do here, but I will think
moreon this.
 
>

Based on the off list discussion, I have modified the test based on
the idea showed in
"isolation/specs/insert-conflict-specconflict.spec", other open point
we had about the race condition that how to ensure that when we unlock
any session it make progress, IMHO the isolation tested is designed in
a way that either all the waiting session returns with the output or
again block on a heavy weight lock before performing the next step.


-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic
Next
From: Matthias van de Meent
Date:
Subject: Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic