Re: serializable anomaly - duplicate primary keys - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: serializable anomaly - duplicate primary keys
Date
Msg-id CAJ7c6TMSLKtuG8Wc7LJGo_TCCt3_6YoF8YTVaPURwOgVO3eY-A@mail.gmail.com
Whole thread
In response to serializable anomaly - duplicate primary keys  (Jacob Brazeal <jacob.brazeal@gmail.com>)
List pgsql-hackers
Hi,

> This extends the table AM interface.  An ABI-preserving back-branch fix can
> be considered separately.

Actually I think we should do just the opposite - focus on the patch
that can be backported and discuss possible improvements for the
`master` branch later.

The root cause is that unique checks use a dirty snapshot. They can
decide a key is unused because of a deletion the transaction cannot
see. The fix might be to ask our own snapshot the same question, and
fail if it still sees the key in use. I don't think this will require
an ABI change.

--
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Commitfest PG20-2 is now closed
Next
From: Zsolt Parragi
Date:
Subject: Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row