Re: BUG #17949: Adding an index introduces serialisation anomalies.

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: artem(dot)anisimov(dot)255(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17949: Adding an index introduces serialisation anomalies.
Date: 2023-06-19 03:23:31
Message-ID: CA+hUKG+zAbVgU91ZjkaCd=1AFOaMRbOp0=E9DP0BwippqqGx5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jun 19, 2023 at 2:29 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> S2: _bt_search(&buf)

> S1: INSERT ...

> S2: PredicateLockRelation(...);

> My point is that S2 won't ever scan S1's tuples, so it won't pass S1's
> xid to CheckForSerializableConflictOut()

[completing that sentence a little more] ... so this was our only
chance to detect that S2 read an object that S1 wrote. But the
_bt_search() and PredicateLockXXX() calls are not atomic and not
rechecked, so a write between them is invisible to the algorithm. I'm
not sure about this, but it's the idea I'm exploring...

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2023-06-19 06:50:59 Re: BUG #17949: Adding an index introduces serialisation anomalies.
Previous Message Thomas Munro 2023-06-19 02:29:46 Re: BUG #17949: Adding an index introduces serialisation anomalies.