Re: Implementing SQL ASSERTION

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Joe Wildish <joe-postgresql(dot)org(at)elusive(dot)cx>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implementing SQL ASSERTION
Date: 2018-01-15 14:40:57
Message-ID: alpine.DEB.2.20.1801151357080.11126@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> I'm wondering about the effect of MVVC on this: if the check is
>> performed when the INSERT is done, concurrent inserting transactions
>> would count the current status which would be ok, but on commit all
>> concurrent inserts would be there and the count could not be ok
>> anymore?

> The patch doesn’t attempt to address concurrency (beyond the obvious
> benefit of reducing the circumstances under which the assertion is
> checked). I am working under the assumption that we will find some
> acceptable way for that to be resolved :-) And at the moment, working in
> serialisable mode addresses this issue. I think that is suggested in the
> thread actually (essentially, if you want to use assertions, you require
> that transactions be performed at serialisable isolation level).

Thanks for the pointers. The "serializable" isolation level restriction
sounds reasonnable.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2018-01-15 14:56:25 Re: WIP Patch: Precalculate stable functions, infrastructure v1
Previous Message Marina Polyakova 2018-01-15 13:54:16 Re: [HACKERS] WIP Patch: Precalculate stable functions, infrastructure v1