postgresql/src
Andres Freund 43e0841970 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
2020-02-11 16:32:11 -08:00
..
backend Use pg_pwrite() in more places. 2020-02-11 17:50:22 +13:00
bin Document the pg_upgrade -j/--jobs option as taking an argument 2020-02-11 23:50:04 +01:00
common Simplify passing of configure arguments to pg_config 2020-02-10 19:23:41 +01:00
fe_utils Fix bug in pg_basebackup -F plain -R. 2020-02-12 09:08:22 +09:00
include Simplify passing of configure arguments to pg_config 2020-02-10 19:23:41 +01:00
interfaces Fix assorted error-cleanup bugs in SSL min/max protocol version code. 2020-02-02 13:09:33 -05:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
port Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Test additional speculative conflict scenarios. 2020-02-11 16:32:11 -08:00
timezone Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tools Simplify passing of configure arguments to pg_config 2020-02-10 19:23:41 +01:00
tutorial Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Simplify passing of configure arguments to pg_config 2020-02-10 19:23:41 +01:00
Makefile.shlib Clean up MinGW def file generation 2019-10-20 10:19:13 +02:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00