postgresql/src/test/isolation/expected
Tom Lane 7b6ec86532 Fix risk of deadlock failure while dropping a partitioned index.
DROP INDEX needs to lock the index's table before the index itself,
else it will deadlock against ordinary queries that acquire the
relation locks in that order.  This is correctly mechanized for
plain indexes by RangeVarCallbackForDropRelation; but in the case of
a partitioned index, we neglected to lock the child tables in advance
of locking the child indexes.  We can fix that by traversing the
inheritance tree and acquiring the needed locks in RemoveRelations,
after we have acquired our locks on the parent partitioned table and
index.

While at it, do some refactoring to eliminate confusion between
the actual and expected relkind in RangeVarCallbackForDropRelation.
We can save a couple of syscache lookups too, by having that function
pass back info that RemoveRelations will need.

Back-patch to v11 where partitioned indexes were added.

Jimmy Yih, Gaurab Dey, Tom Lane

Discussion: https://postgr.es/m/BYAPR05MB645402330042E17D91A70C12BD5F9@BYAPR05MB6454.namprd05.prod.outlook.com
2022-03-21 12:22:13 -04:00
..
aborted-keyrevoke.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
alter-table-1.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
alter-table-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
alter-table-3.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
alter-table-4.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
async-notify.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
classroom-scheduling.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
create-trigger.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
deadlock-hard.out Use annotations to reduce instability of isolation-test results. 2021-06-22 21:43:12 -04:00
deadlock-parallel.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
deadlock-simple.out Use annotations to reduce instability of isolation-test results. 2021-06-22 21:43:12 -04: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 display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
delete-abort-savept.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
detach-partition-concurrently-1.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
detach-partition-concurrently-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
detach-partition-concurrently-3.out Rethink blocking annotations in detach-partition-concurrently-[34]. 2021-07-05 14:34:47 -04:00
detach-partition-concurrently-4.out Rethink blocking annotations in detach-partition-concurrently-[34]. 2021-07-05 14:34:47 -04:00
drop-index-concurrently-1.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
drop-index-concurrently-1_2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
eval-plan-qual-trigger.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
eval-plan-qual.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04: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 Use annotations to reduce instability of isolation-test results. 2021-06-22 21:43:12 -04:00
fk-deadlock2_2.out Use annotations to reduce instability of isolation-test results. 2021-06-22 21:43:12 -04:00
fk-deadlock_1.out Use annotations to reduce instability of isolation-test results. 2021-06-22 21:43:12 -04:00
fk-partitioned-1.out Use annotations to reduce instability of isolation-test results. 2021-06-22 21:43:12 -04:00
fk-partitioned-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
freeze-the-dead.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
horizons.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
index-only-scan.out Fix serializable mode with index-only scans. 2012-09-04 21:13:11 -05:00
inherit-temp.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
insert-conflict-do-nothing-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
insert-conflict-do-nothing.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
insert-conflict-do-update-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
insert-conflict-do-update-3.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
insert-conflict-do-update.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
insert-conflict-specconflict.out isolationtester: append session name to application_name. 2021-12-13 12:02:06 -08:00
lock-committed-keyupdate.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
lock-committed-update.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
lock-update-delete.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
lock-update-delete_1.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
lock-update-traversal.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
multiple-cic.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
multiple-row-versions.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
multixact-no-deadlock.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
multixact-no-forget.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
multixact-no-forget_1.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
nowait-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
nowait-3.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
nowait-4.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
nowait-4_1.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
nowait-5.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
nowait.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
partial-index.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
partition-concurrent-attach.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
partition-drop-index-locking.out Fix risk of deadlock failure while dropping a partitioned index. 2022-03-21 12:22:13 -04:00
partition-key-update-1.out Use annotations to reduce instability of isolation-test results. 2021-06-22 21:43:12 -04:00
partition-key-update-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
partition-key-update-3.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
partition-key-update-4.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
plpgsql-toast.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
predicate-gin.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
predicate-gist.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
predicate-hash.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
predicate-lock-hot-tuple.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
prepared-transactions-cic.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
prepared-transactions.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
project-manager.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
propagate-lock-delete.out Use annotations to reduce instability of isolation-test results. 2021-06-22 21:43:12 -04:00
read-only-anomaly-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
read-only-anomaly-3.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
read-only-anomaly.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
read-write-unique-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
read-write-unique-3.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
read-write-unique-4.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
read-write-unique.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
receipt-report.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
referential-integrity.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
reindex-concurrently-toast.out Fix corruption of toast indexes with REINDEX CONCURRENTLY 2021-12-08 11:01:08 +09:00
reindex-concurrently.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04: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 Add Boolean node 2022-01-17 10:38:23 +01:00
sequence-ddl.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
serializable-parallel-2.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
serializable-parallel.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04: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 Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
skip-locked-3.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
skip-locked-4.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
skip-locked-4_1.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
skip-locked.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
temp-schema-cleanup.out Fix temporary object cleanup failing due to toast access without snapshot. 2022-02-21 08:57:34 -08:00
temporal-range-integrity.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
timeouts.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
total-cash.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
truncate-conflict.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
tuplelock-conflict.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
tuplelock-partition.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
tuplelock-update.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
tuplelock-upgrade-no-deadlock.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
two-ids.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04:00
update-conflict-out.out Improve display of query results in isolation tests. 2021-06-23 11:13:00 -04: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 Simplify lazy_scan_heap's handling of scanned pages. 2022-02-11 14:32:17 -08:00
vacuum-skip-locked.out Indicate session name in isolationtester notices 2018-11-09 13:08:00 -03:00