git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: be6221e) | patch
Test additional speculative conflict scenarios.
2020年2月12日 00:32:11 +0000 (16:32 -0800)
2020年2月12日 00:32:11 +0000 (16:32 -0800)
commit 43e08419708a938236e76cd50de2db512e1c3a0c
Test additional speculative conflict scenarios.

Previously, the speculative insert tests did not cover the case when a
tuple t is inserted into a table with a unique index on a column but
before it can insert into the index, a concurrent transaction has
inserted a conflicting value into the index and the insertion of tuple t
must be aborted.

The basic permutation is one session successfully inserts into the table
and an associated unique index while a concurrent session successfully
inserts into the table but discovers a conflict before inserting into
the index and must abort the insertion.

Several variants on this include:
- swap which session is successful
- first session insert transaction does not commit, so second session
must wait on a transaction lock
- first session insert does not "complete", so second session must wait
on a speculative insertion lock

Also, refactor the existing TOAST table upsert test to be in the same
spec and reuse the steps.

Author: Melanie Plageman, Ashwin Agrawal, Andres Freund
Reviewed-by: Andres Freund, Taylor Vesely
Discussion: https://postgr.es/m/CAAKRu_ZRmxy_OEryfY3G8Zp01ouhgw59_-_Cm8n7LzRH5BAvng@mail.gmail.com
src/test/isolation/expected/insert-conflict-specconflict.out diff | blob | blame | history
src/test/isolation/expected/insert-conflict-toast.out [deleted file] blob | blame | history
src/test/isolation/isolation_schedule diff | blob | blame | history
src/test/isolation/specs/insert-conflict-specconflict.spec diff | blob | blame | history
src/test/isolation/specs/insert-conflict-toast.spec [deleted file] blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /