Add some isolation tests for CLUSTER
authorMichael Paquier <[email protected]>
Tue, 26 Apr 2022 04:41:17 +0000 (13:41 +0900)
committerMichael Paquier <[email protected]>
Tue, 26 Apr 2022 04:41:17 +0000 (13:41 +0900)
commit21a10368eb3fce73f146d7e48b4d81496f60d965
treef381e73aba74f546fdd4473c6266b35f7837ccda
parentb787c554c264cbed4de4eff2bb170a5224f0cfa5
Add some isolation tests for CLUSTER

This commit adds two isolation tests for CLUSTER, using:
- A normal table, making sure that CLUSTER blocks and completes if the
table is locked by a concurrent session.
- A partitioned table with a partition owned by a different user.  If
the partitioned table is locked by a concurrent session, CLUSTER on the
partitioned table should block.  If the partition owned by a different
user is locked, CLUSTER on its partitioned table should complete and
skip the partition.  3f19e17 has added an early check to ignore such a
partition with a SQL regression test, but this was not checking that
CLUSTER should not block.

Discussion: https://postgr.es/m/[email protected]
src/test/isolation/expected/cluster-conflict-partition.out [new file with mode: 0644]
src/test/isolation/expected/cluster-conflict.out [new file with mode: 0644]
src/test/isolation/isolation_schedule
src/test/isolation/specs/cluster-conflict-partition.spec [new file with mode: 0644]
src/test/isolation/specs/cluster-conflict.spec [new file with mode: 0644]