On 16/03/18 00:26, Alexander Korotkov wrote:
> On Tue, Mar 13, 2018 at 3:26 PM, Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>> On 13/03/18 14:02, Alexander Korotkov wrote:
>>> And what happen if somebody concurrently set (fastupdate = on)?
>>> Can we miss conflicts because of that?
>>
>> No, AccessExclusiveLock will prevent this kind of problems with enabling
>> fastupdate.
>
> True. I didn't notice that ALTER INDEX SET locks index in so high mode.
> Thus, everything is fine from this perspective.
Nope, an AccessExclusiveLock is not good enough. Predicate locks stay
around after the transaction has committed and regular locks have been
released.
Attached is a test case that demonstrates a case where we miss a
serialization failure, when fastupdate is turned on concurrently. It
works on v10, but fails to throw a serialization error on v11.
- Heikki