Commit 0a3edbb3 authored by Robert Haas's avatar Robert Haas

Speed up isolation test for concurrent VACUUM/ANALYZE behavior.

Per Tom Lane, the old test sometimes times out with CLOBBER_CACHE_ALWAYS.

Nathan Bossart

Discussion: http://postgr.es/m/28614.1512583046@sss.pgh.pa.us
parent 28724fd9
......@@ -3,74 +3,74 @@ Parsed test spec with 2 sessions
starting permutation: lock vac_specified drop_and_commit
step lock:
BEGIN;
LOCK test1 IN SHARE MODE;
LOCK part1 IN SHARE MODE;
step vac_specified: VACUUM test1, test2; <waiting ...>
step vac_specified: VACUUM part1, part2; <waiting ...>
step drop_and_commit:
DROP TABLE test2;
DROP TABLE part2;
COMMIT;
WARNING: skipping vacuum of "test2" --- relation no longer exists
WARNING: skipping vacuum of "part2" --- relation no longer exists
step vac_specified: <... completed>
starting permutation: lock vac_all drop_and_commit
starting permutation: lock vac_all_parts drop_and_commit
step lock:
BEGIN;
LOCK test1 IN SHARE MODE;
LOCK part1 IN SHARE MODE;
step vac_all: VACUUM; <waiting ...>
step vac_all_parts: VACUUM parted; <waiting ...>
step drop_and_commit:
DROP TABLE test2;
DROP TABLE part2;
COMMIT;
step vac_all: <... completed>
step vac_all_parts: <... completed>
starting permutation: lock analyze_specified drop_and_commit
step lock:
BEGIN;
LOCK test1 IN SHARE MODE;
LOCK part1 IN SHARE MODE;
step analyze_specified: ANALYZE test1, test2; <waiting ...>
step analyze_specified: ANALYZE part1, part2; <waiting ...>
step drop_and_commit:
DROP TABLE test2;
DROP TABLE part2;
COMMIT;
WARNING: skipping analyze of "test2" --- relation no longer exists
WARNING: skipping analyze of "part2" --- relation no longer exists
step analyze_specified: <... completed>
starting permutation: lock analyze_all drop_and_commit
starting permutation: lock analyze_all_parts drop_and_commit
step lock:
BEGIN;
LOCK test1 IN SHARE MODE;
LOCK part1 IN SHARE MODE;
step analyze_all: ANALYZE; <waiting ...>
step analyze_all_parts: ANALYZE parted; <waiting ...>
step drop_and_commit:
DROP TABLE test2;
DROP TABLE part2;
COMMIT;
step analyze_all: <... completed>
step analyze_all_parts: <... completed>
starting permutation: lock vac_analyze_specified drop_and_commit
step lock:
BEGIN;
LOCK test1 IN SHARE MODE;
LOCK part1 IN SHARE MODE;
step vac_analyze_specified: VACUUM ANALYZE test1, test2; <waiting ...>
step vac_analyze_specified: VACUUM ANALYZE part1, part2; <waiting ...>
step drop_and_commit:
DROP TABLE test2;
DROP TABLE part2;
COMMIT;
WARNING: skipping vacuum of "test2" --- relation no longer exists
WARNING: skipping vacuum of "part2" --- relation no longer exists
step vac_analyze_specified: <... completed>
starting permutation: lock vac_analyze_all drop_and_commit
starting permutation: lock vac_analyze_all_parts drop_and_commit
step lock:
BEGIN;
LOCK test1 IN SHARE MODE;
LOCK part1 IN SHARE MODE;
step vac_analyze_all: VACUUM ANALYZE; <waiting ...>
step vac_analyze_all_parts: VACUUM ANALYZE parted; <waiting ...>
step drop_and_commit:
DROP TABLE test2;
DROP TABLE part2;
COMMIT;
step vac_analyze_all: <... completed>
step vac_analyze_all_parts: <... completed>
......@@ -7,39 +7,39 @@
setup
{
CREATE TABLE test1 (a INT);
CREATE TABLE test2 (a INT);
CREATE TABLE parted (a INT) PARTITION BY LIST (a);
CREATE TABLE part1 PARTITION OF parted FOR VALUES IN (1);
CREATE TABLE part2 PARTITION OF parted FOR VALUES IN (2);
}
teardown
{
DROP TABLE IF EXISTS test1;
DROP TABLE IF EXISTS test2;
DROP TABLE IF EXISTS parted;
}
session "s1"
step "lock"
{
BEGIN;
LOCK test1 IN SHARE MODE;
LOCK part1 IN SHARE MODE;
}
step "drop_and_commit"
{
DROP TABLE test2;
DROP TABLE part2;
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; }
step "vac_specified" { VACUUM part1, part2; }
step "vac_all_parts" { VACUUM parted; }
step "analyze_specified" { ANALYZE part1, part2; }
step "analyze_all_parts" { ANALYZE parted; }
step "vac_analyze_specified" { VACUUM ANALYZE part1, part2; }
step "vac_analyze_all_parts" { VACUUM ANALYZE parted; }
permutation "lock" "vac_specified" "drop_and_commit"
permutation "lock" "vac_all" "drop_and_commit"
permutation "lock" "vac_all_parts" "drop_and_commit"
permutation "lock" "analyze_specified" "drop_and_commit"
permutation "lock" "analyze_all" "drop_and_commit"
permutation "lock" "analyze_all_parts" "drop_and_commit"
permutation "lock" "vac_analyze_specified" "drop_and_commit"
permutation "lock" "vac_analyze_all" "drop_and_commit"
permutation "lock" "vac_analyze_all_parts" "drop_and_commit"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment