postgresql/src/test/isolation/expected
Alvaro Herrera f481d28232
Check default partitions constraints while descending
Partitioning tuple route code assumes that the partition chosen while
descending the partition hierarchy is always the correct one.  This is
true except when the partition is the default partition and another
partition has been added concurrently: the partition constraint changes
and we don't recheck it.  This can lead to tuples mistakenly being added
to the default partition that should have been rejected.

Fix by rechecking the default partition constraint while descending the
hierarchy.

An isolation test based on the reproduction steps described by Hao Wu
(with tweaks for extra coverage) is included.

Backpatch to 12, where this bug came in with 898e5e3290.

Reported by: Hao Wu <hawu@vmware.com>
Author: Amit Langote <amitlangote09@gmail.com>
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/CA+HiwqFqBmcSSap4sFnCBUEL_VfOMmEKaQ3gwUhyfa4c7J_-nA@mail.gmail.com
Discussion: https://postgr.es/m/DM5PR0501MB3910E97A9EDFB4C775CF3D75A42F0@DM5PR0501MB3910.namprd05.prod.outlook.com
2020-09-08 19:35:15 -03:00
..
aborted-keyrevoke.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
aborted-keyrevoke_2.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
alter-table-1.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
alter-table-2.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
alter-table-3.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
alter-table-4.out Avoid unnecessary failure in SELECT concurrent with ALTER NO INHERIT. 2018-01-12 15:46:37 -05:00
async-notify.out Avoid assertion failure with LISTEN in a serializable transaction. 2019-11-24 15:57:49 -05:00
classroom-scheduling.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
create-trigger.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
deadlock-hard.out Revert "Still further tweaking of deadlock isolation tests." 2016-02-12 17:02:59 -05:00
deadlock-parallel.out Make deadlock-parallel isolation test more robust. 2019-08-17 18:15:38 -04:00
deadlock-simple.out Add some isolation tests for deadlock detection and resolution. 2016-02-11 08:38:09 -05:00
deadlock-soft-2.out Add some isolation tests for deadlock detection and resolution. 2016-02-11 08:38:09 -05:00
deadlock-soft.out Add some isolation tests for deadlock detection and resolution. 2016-02-11 08:38:09 -05:00
delete-abort-savept-2.out Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
delete-abort-savept.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
drop-index-concurrently-1.out Implement Incremental Sort 2020-04-06 21:35:10 +02:00
drop-index-concurrently-1_2.out Allow drop-index-concurrently-1 test to run at any isolation level. 2013-10-08 16:55:12 -05:00
eval-plan-qual-trigger.out Disable one more set of tests from c884119950. 2019-10-05 08:05:11 -07:00
eval-plan-qual.out Fix dangling pointer in EvalPlanQual machinery. 2020-01-28 17:26:37 -05:00
fk-contention.out Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
fk-deadlock.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
fk-deadlock2.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
fk-deadlock2_1.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
fk-deadlock2_2.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
fk-deadlock_1.out Specify permutations for isolation tests with "invalid" permutations. 2016-02-11 08:33:24 -05:00
fk-partitioned-1.out Support foreign keys that reference partitioned tables 2019-04-03 14:40:21 -03:00
fk-partitioned-2.out Support foreign keys that reference partitioned tables 2019-04-03 14:40:21 -03:00
freeze-the-dead.out Fix pruning of locked and updated tuples. 2017-12-14 18:20:47 -08:00
index-only-scan.out Fix serializable mode with index-only scans. 2012-09-04 21:13:11 -05:00
inherit-temp.out Ignore inherited temp relations from other sessions when truncating 2018-12-27 10:16:19 +09:00
insert-conflict-do-nothing-2.out Don't throw serialization errors for self-conflicts in INSERT ON CONFLICT. 2016-10-23 18:36:13 -04:00
insert-conflict-do-nothing.out Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
insert-conflict-do-update-2.out Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
insert-conflict-do-update-3.out Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
insert-conflict-do-update.out Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
insert-conflict-specconflict.out Change locktype "speculative token" to "spectoken". 2020-05-15 21:47:34 -04:00
insert-conflict-toast_1.out Add alternative output for ON CONFLICT toast isolation test. 2016-08-18 17:34:05 -07:00
lock-committed-keyupdate.out Avoid serializability errors when locking a tuple with a committed update 2016-07-15 14:17:20 -04:00
lock-committed-update.out Avoid serializability errors when locking a tuple with a committed update 2016-07-15 14:17:20 -04:00
lock-update-delete.out Avoid serializability errors when locking a tuple with a committed update 2016-07-15 14:17:20 -04:00
lock-update-delete_1.out Make some isolationtester specs more complete 2013-10-04 15:52:58 -03:00
lock-update-traversal.out Make some isolationtester specs more complete 2013-10-04 15:52:58 -03:00
multiple-cic.out Revert "Fix isolation test to be less timing-dependent" 2018-01-03 18:22:41 -03:00
multiple-cic_1.out Revert "Fix isolation test to be less timing-dependent" 2018-01-03 18:22:41 -03:00
multiple-row-versions.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
multixact-no-deadlock.out Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
multixact-no-forget.out Fix improper abort during update chain locking 2013-12-05 17:47:51 -03:00
multixact-no-forget_1.out Fix improper abort during update chain locking 2013-12-05 17:47:51 -03:00
nowait-2.out Add regression tests for SELECT FOR UPDATE/SHARE NOWAIT. 2014-08-25 20:14:43 +03:00
nowait-3.out Add regression tests for SELECT FOR UPDATE/SHARE NOWAIT. 2014-08-25 20:14:43 +03:00
nowait-4.out Fix FOR UPDATE NOWAIT on updated tuple chains 2014-08-27 19:15:18 -04:00
nowait-4_1.out Fix FOR UPDATE NOWAIT on updated tuple chains 2014-08-27 19:15:18 -04:00
nowait-5.out Fix FOR UPDATE NOWAIT on updated tuple chains 2014-08-27 19:15:18 -04:00
nowait.out Add regression tests for SELECT FOR UPDATE/SHARE NOWAIT. 2014-08-25 20:14:43 +03:00
partial-index.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
partition-concurrent-attach.out Check default partitions constraints while descending 2020-09-08 19:35:15 -03:00
partition-key-update-1.out tableam: Add tuple_{insert, delete, update, lock} and use. 2019-03-23 19:55:57 -07:00
partition-key-update-2.out Raise error when affecting tuple moved into different partition. 2018-04-07 13:24:27 -07:00
partition-key-update-3.out Raise error when affecting tuple moved into different partition. 2018-04-07 13:24:27 -07:00
partition-key-update-4.out Allow using the updated tuple while moving it to a different partition. 2018-07-12 12:51:39 +05:30
plpgsql-toast.out Don't drop NOTICE messages in isolation tests. 2019-07-27 15:59:57 -04:00
predicate-gin.out Reduce length of GIN predicate locking isolation test suite 2018-12-28 03:33:10 +03:00
predicate-gist.out Add predicate locking for GiST 2018-03-27 15:43:19 +03:00
predicate-hash.out Predicate locking in hash indexes. 2018-04-07 16:59:14 +03:00
predicate-lock-hot-tuple.out Fix predicate-locking of HOT updated rows. 2019-08-07 12:40:49 +03:00
prepared-transactions.out Add an SSI regression test that tests all interesting permutations in the 2011-08-18 17:09:58 +03:00
project-manager.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
propagate-lock-delete.out Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
read-only-anomaly-2.out Add isolation test for SERIALIZABLE READ ONLY DEFERRABLE. 2017-04-05 10:04:36 -05:00
read-only-anomaly-3.out Add isolation test for SERIALIZABLE READ ONLY DEFERRABLE. 2017-04-05 10:04:36 -05:00
read-only-anomaly.out Add isolation test for SERIALIZABLE READ ONLY DEFERRABLE. 2017-04-05 10:04:36 -05:00
read-write-unique-2.out Detect SSI conflicts before reporting constraint violations 2016-04-07 11:12:35 -05:00
read-write-unique-3.out Detect SSI conflicts before reporting constraint violations 2016-04-07 11:12:35 -05:00
read-write-unique-4.out Detect SSI conflicts before reporting constraint violations 2016-04-07 11:12:35 -05:00
read-write-unique.out Detect SSI conflicts before reporting constraint violations 2016-04-07 11:12:35 -05:00
receipt-report.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
referential-integrity.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
reindex-concurrently.out REINDEX CONCURRENTLY 2019-03-29 08:26:33 +01:00
reindex-schema.out Improve handling of dropped relations for REINDEX DATABASE/SCHEMA/SYSTEM 2020-09-02 09:08:12 +09:00
ri-trigger.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
sequence-ddl.out Make ALTER SEQUENCE, including RESTART, fully transactional. 2017-06-01 14:19:33 -07:00
serializable-parallel-2.out Enable parallel query with SERIALIZABLE isolation. 2019-03-15 17:47:04 +13:00
serializable-parallel.out Enable parallel query with SERIALIZABLE isolation. 2019-03-15 17:47:04 +13:00
simple-write-skew.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
skip-locked-2.out Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
skip-locked-3.out Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
skip-locked-4.out Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
skip-locked-4_1.out Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
skip-locked.out Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
temporal-range-integrity.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
timeouts.out Bump up timeout delays some more in timeouts isolation test. 2013-03-20 13:53:43 -04:00
total-cash.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
truncate-conflict.out Improve TRUNCATE by avoiding early lock queue 2018-08-10 18:26:59 +02:00
tuplelock-conflict.out Fix thinko in lock mode enum 2015-01-04 15:48:29 -03:00
tuplelock-update.out Make new isolationtester test more stable 2016-02-29 16:34:56 -03:00
tuplelock-upgrade-no-deadlock.out Avoid spurious deadlocks when upgrading a tuple lock 2019-06-18 18:23:16 -04:00
two-ids.out Strip whitespace from SQL blocks in the isolation test suite. This is purely 2011-08-18 17:09:58 +03:00
update-conflict-out.out Avoid update conflict out serialization anomalies. 2020-06-11 10:09:47 -07:00
update-locked-tuple.out Avoid serializability errors when locking a tuple with a committed update 2016-07-15 14:17:20 -04:00
vacuum-concurrent-drop.out Indicate session name in isolationtester notices 2018-11-09 13:08:00 -03:00
vacuum-conflict.out Indicate session name in isolationtester notices 2018-11-09 13:08:00 -03:00
vacuum-reltuples.out Repair test for vacuum reltuples fix. 2017-03-17 14:35:54 +00:00
vacuum-skip-locked.out Indicate session name in isolationtester notices 2018-11-09 13:08:00 -03:00