Re: serializable transaction: exclude constraint violation (backed byGIST index) instead of ssi conflict
От | Thomas Munro |
---|---|
Тема | Re: serializable transaction: exclude constraint violation (backed byGIST index) instead of ssi conflict |
Дата | |
Msg-id | CA+hUKGLBJUR9G6_DUkBXy4_BqWsrStMnkQA7DiwJaJnkt-4pCA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: serializable transaction: exclude constraint violation (backed byGIST index) instead of ssi conflict (Thomas Munro <thomas.munro@gmail.com>) |
Ответы |
Re: serializable transaction: exclude constraint violation (backed byGIST index) instead of ssi conflict
|
Список | pgsql-hackers |
On Thu, Apr 11, 2019 at 10:54 AM Thomas Munro <thomas.munro@gmail.com> wrote: > On Thu, Apr 11, 2019 at 9:43 AM Peter Billen <peter.billen@gmail.com> wrote: > > I kinda expected/hoped that transaction t2 would get aborted by a serialization error, and not an exclude constraintviolation. This makes the application session bound to transaction t2 failing, as only serialization errors areretried. > Yeah, I agree, the behaviour you are expecting is desirable and we > should figure out how to do that. The basic trick for btree unique > constraints was to figure out where the index *would* have written, to > give the SSI machinery a chance to object to that before raising the > UCV. I wonder if we can use the same technique here... at first > glance, check_exclusion_or_unique_constraint() is raising the error, > but is not index AM specific code, and it is somewhat removed from the > GIST code that would do the equivalent > CheckForSerializableConflictIn() call. I haven't looked into it > properly, but that certainly complicates matters somewhat... Perhaps > the index AM would actually need a new entrypoint that could be called > before the error is raised, or perhaps there is an easier way. Adding Kevin (architect of SSI and reviewer/committer of my UCV interception patch) and Shubham (author of GIST SSI support) to the CC list in case they have thoughts on this. -- Thomas Munro https://enterprisedb.com
В списке pgsql-hackers по дате отправления: