diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/isolation/expected/vacuum-concurrent-drop.out | 76 | ||||
| -rw-r--r-- | src/test/isolation/isolation_schedule | 1 | ||||
| -rw-r--r-- | src/test/isolation/specs/vacuum-concurrent-drop.spec | 45 |
3 files changed, 122 insertions, 0 deletions
diff --git a/src/test/isolation/expected/vacuum-concurrent-drop.out b/src/test/isolation/expected/vacuum-concurrent-drop.out new file mode 100644 index 00000000000..72d80a1de1e --- /dev/null +++ b/src/test/isolation/expected/vacuum-concurrent-drop.out @@ -0,0 +1,76 @@ +Parsed test spec with 2 sessions + +starting permutation: lock vac_specified drop_and_commit +step lock: + BEGIN; + LOCK test1 IN SHARE MODE; + +step vac_specified: VACUUM test1, test2; <waiting ...> +step drop_and_commit: + DROP TABLE test2; + COMMIT; + +WARNING: skipping vacuum of "test2" --- relation no longer exists +step vac_specified: <... completed> + +starting permutation: lock vac_all drop_and_commit +step lock: + BEGIN; + LOCK test1 IN SHARE MODE; + +step vac_all: VACUUM; <waiting ...> +step drop_and_commit: + DROP TABLE test2; + COMMIT; + +step vac_all: <... completed> + +starting permutation: lock analyze_specified drop_and_commit +step lock: + BEGIN; + LOCK test1 IN SHARE MODE; + +step analyze_specified: ANALYZE test1, test2; <waiting ...> +step drop_and_commit: + DROP TABLE test2; + COMMIT; + +WARNING: skipping analyze of "test2" --- relation no longer exists +step analyze_specified: <... completed> + +starting permutation: lock analyze_all drop_and_commit +step lock: + BEGIN; + LOCK test1 IN SHARE MODE; + +step analyze_all: ANALYZE; <waiting ...> +step drop_and_commit: + DROP TABLE test2; + COMMIT; + +step analyze_all: <... completed> + +starting permutation: lock vac_analyze_specified drop_and_commit +step lock: + BEGIN; + LOCK test1 IN SHARE MODE; + +step vac_analyze_specified: VACUUM ANALYZE test1, test2; <waiting ...> +step drop_and_commit: + DROP TABLE test2; + COMMIT; + +WARNING: skipping vacuum of "test2" --- relation no longer exists +step vac_analyze_specified: <... completed> + +starting permutation: lock vac_analyze_all drop_and_commit +step lock: + BEGIN; + LOCK test1 IN SHARE MODE; + +step vac_analyze_all: VACUUM ANALYZE; <waiting ...> +step drop_and_commit: + DROP TABLE test2; + COMMIT; + +step vac_analyze_all: <... completed> diff --git a/src/test/isolation/isolation_schedule b/src/test/isolation/isolation_schedule index 32c965b2a02..e41b9164cd0 100644 --- a/src/test/isolation/isolation_schedule +++ b/src/test/isolation/isolation_schedule @@ -62,3 +62,4 @@ test: sequence-ddl test: async-notify test: vacuum-reltuples test: timeouts +test: vacuum-concurrent-drop diff --git a/src/test/isolation/specs/vacuum-concurrent-drop.spec b/src/test/isolation/specs/vacuum-concurrent-drop.spec new file mode 100644 index 00000000000..31fc161e022 --- /dev/null +++ b/src/test/isolation/specs/vacuum-concurrent-drop.spec @@ -0,0 +1,45 @@ +# Test for log messages emitted by VACUUM and ANALYZE when a specified +# relation is concurrently dropped. +# +# This also verifies that log messages are not emitted for concurrently +# dropped relations that were not specified in the VACUUM or ANALYZE +# command. + +setup +{ + CREATE TABLE test1 (a INT); + CREATE TABLE test2 (a INT); +} + +teardown +{ + DROP TABLE IF EXISTS test1; + DROP TABLE IF EXISTS test2; +} + +session "s1" +step "lock" +{ + BEGIN; + LOCK test1 IN SHARE MODE; +} +step "drop_and_commit" +{ + DROP TABLE test2; + COMMIT; +} + +session "s2" +step "vac_specified" { VACUUM test1, test2; } +step "vac_all" { VACUUM; } +step "analyze_specified" { ANALYZE test1, test2; } +step "analyze_all" { ANALYZE; } +step "vac_analyze_specified" { VACUUM ANALYZE test1, test2; } +step "vac_analyze_all" { VACUUM ANALYZE; } + +permutation "lock" "vac_specified" "drop_and_commit" +permutation "lock" "vac_all" "drop_and_commit" +permutation "lock" "analyze_specified" "drop_and_commit" +permutation "lock" "analyze_all" "drop_and_commit" +permutation "lock" "vac_analyze_specified" "drop_and_commit" +permutation "lock" "vac_analyze_all" "drop_and_commit" |
