diff --git a/src/test/isolation/expected/vacuum_test.out b/src/test/isolation/expected/vacuum_test.out new file mode 100644 index 00000000000..38ef1e68b5d --- /dev/null +++ b/src/test/isolation/expected/vacuum_test.out @@ -0,0 +1,23 @@ +unused step name: s1_activity_print +unused step name: s1_delete_half_table +unused step name: s1_set_agressive_vacuum +unused step name: s1_update +unused step name: s1_vacuum +unused step name: s1_vacuum_full +Parsed test spec with 1 sessions + +starting permutation: s1_insert s1_delete_full_table s1_vacuum_parallel s1_print_vacuum_stats_tables +step s1_insert: INSERT INTO vestat(x) SELECT id FROM generate_series(1,2) As id; +step s1_delete_full_table: DELETE FROM vestat; +step s1_vacuum_parallel: VACUUM (PARALLEL 2, INDEX_CLEANUP ON) vestat; +step s1_print_vacuum_stats_tables: + SELECT n_dead_tup, n_live_tup, n_tup_del + FROM pg_stat_all_tables vt, pg_class c + WHERE vt.relname = 'vestat' AND + vt.relid = c.oid; + +n_dead_tup|n_live_tup|n_tup_del +----------+----------+--------- + 0| 0| 0 +(1 row) + diff --git a/src/test/isolation/isolation_schedule b/src/test/isolation/isolation_schedule index 0342eb39e40..edb751c2ff4 100644 --- a/src/test/isolation/isolation_schedule +++ b/src/test/isolation/isolation_schedule @@ -1,116 +1 @@ -test: read-only-anomaly -test: read-only-anomaly-2 -test: read-only-anomaly-3 -test: read-write-unique -test: read-write-unique-2 -test: read-write-unique-3 -test: read-write-unique-4 -test: simple-write-skew -test: receipt-report -test: temporal-range-integrity -test: project-manager -test: classroom-scheduling -test: total-cash -test: referential-integrity -test: ri-trigger -test: partial-index -test: two-ids -test: multiple-row-versions -test: index-only-scan -test: predicate-lock-hot-tuple -test: update-conflict-out -test: deadlock-simple -test: deadlock-hard -test: deadlock-soft -test: deadlock-soft-2 -test: deadlock-parallel -test: detach-partition-concurrently-1 -test: detach-partition-concurrently-2 -test: detach-partition-concurrently-3 -test: detach-partition-concurrently-4 -test: fk-contention -test: fk-deadlock -test: fk-deadlock2 -test: fk-partitioned-1 -test: fk-partitioned-2 -test: fk-snapshot -test: subxid-overflow -test: eval-plan-qual -test: eval-plan-qual-trigger -test: lock-update-delete -test: lock-update-traversal -test: inherit-temp -test: temp-schema-cleanup -test: insert-conflict-do-nothing -test: insert-conflict-do-nothing-2 -test: insert-conflict-do-update -test: insert-conflict-do-update-2 -test: insert-conflict-do-update-3 -test: insert-conflict-specconflict -test: merge-insert-update -test: merge-delete -test: merge-update -test: merge-match-recheck -test: merge-join -test: delete-abort-savept -test: delete-abort-savept-2 -test: aborted-keyrevoke -test: multixact-no-deadlock -test: multixact-no-forget -test: lock-committed-update -test: lock-committed-keyupdate -test: update-locked-tuple -test: reindex-concurrently -test: reindex-concurrently-toast -test: reindex-schema -test: propagate-lock-delete -test: tuplelock-conflict -test: tuplelock-update -test: tuplelock-upgrade-no-deadlock -test: tuplelock-partition -test: freeze-the-dead -test: nowait -test: nowait-2 -test: nowait-3 -test: nowait-4 -test: nowait-5 -test: skip-locked -test: skip-locked-2 -test: skip-locked-3 -test: skip-locked-4 -test: drop-index-concurrently-1 -test: multiple-cic -test: alter-table-1 -test: alter-table-2 -test: alter-table-3 -test: alter-table-4 -test: create-trigger -test: sequence-ddl -test: async-notify -test: vacuum-no-cleanup-lock -test: timeouts -test: vacuum-concurrent-drop -test: vacuum-conflict -test: vacuum-skip-locked -test: stats -test: horizons -test: predicate-hash -test: predicate-gist -test: predicate-gin -test: partition-concurrent-attach -test: partition-drop-index-locking -test: partition-key-update-1 -test: partition-key-update-2 -test: partition-key-update-3 -test: partition-key-update-4 -test: partition-merge -test: partition-split -test: plpgsql-toast -test: cluster-conflict -test: cluster-conflict-partition -test: truncate-conflict -test: serializable-parallel -test: serializable-parallel-2 -test: serializable-parallel-3 -test: matview-write-skew -test: lock-nowait +test: vacuum_test \ No newline at end of file diff --git a/src/test/isolation/specs/vacuum_test.spec b/src/test/isolation/specs/vacuum_test.spec new file mode 100644 index 00000000000..1fb4d67cc34 --- /dev/null +++ b/src/test/isolation/specs/vacuum_test.spec @@ -0,0 +1,34 @@ +setup +{ + CREATE TABLE vestat (x int primary key) WITH (autovacuum_enabled = off); + +} + +teardown +{ + DROP TABLE vestat CASCADE; +} + +session s1 +step s1_set_agressive_vacuum { SET vacuum_freeze_min_age = 0; } +step s1_insert { INSERT INTO vestat(x) SELECT id FROM generate_series(1,2) As id; } +step s1_update { UPDATE vestat SET x = x+1; } +step s1_delete_half_table { DELETE FROM vestat WHERE x % 2 = 0; } +step s1_delete_full_table { DELETE FROM vestat; } +step s1_vacuum { VACUUM vestat; } +step s1_vacuum_full { VACUUM FULL vestat; } +step s1_vacuum_parallel { VACUUM (PARALLEL 2, INDEX_CLEANUP ON) vestat; } +step s1_activity_print { select application_name, backend_type from pg_stat_activity order by (application_name, backend_type); } +step s1_print_vacuum_stats_tables +{ + SELECT n_dead_tup, n_live_tup, n_tup_del + FROM pg_stat_all_tables vt, pg_class c + WHERE vt.relname = 'vestat' AND + vt.relid = c.oid; +} + +permutation + s1_insert + s1_delete_full_table + s1_vacuum_parallel + s1_print_vacuum_stats_tables \ No newline at end of file -- 2.34.1