Skip to content

Commit

Permalink
Stabilize regression tests
Browse files Browse the repository at this point in the history
During the AUTOVACUUM regression tests, unintended AUTOVACUUM runs
occasionally occurred on unrelated catalogs, notably in pg_collation,
causing test failures. Given that the information from theses tables
was not crucial for the tests, the check targets are limited to the
public schema.

(fix #138)
  • Loading branch information
tashiro-hisashi authored and horiguti committed Nov 2, 2023
1 parent b3fe657 commit 51ddb82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/expected/function-logger.out
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ DELETE 4001
(1 row)

/**--- Collect the AUTOVACUUM information ---**/
instid | database | schema | table | start | index_scans | page_removed | page_remain | tup_removed | tup_remain | tup_dead | page_hit | page_miss | page_dirty | read_rate | write_rate | duration
--------+-----------+------------+-----------+-------+-------------+--------------+-------------+-------------+------------+----------+----------+-----------+------------+-----------+------------+----------
1 | postgres | public | tbl01 | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx
1 | template1 | pg_catalog | pg_depend | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx
(2 rows)
instid | database | schema | table | start | index_scans | page_removed | page_remain | tup_removed | tup_remain | tup_dead | page_hit | page_miss | page_dirty | read_rate | write_rate | duration
--------+----------+--------+-------+-------+-------------+--------------+-------------+-------------+------------+----------+----------+-----------+------------+-----------+------------+----------
1 | postgres | public | tbl01 | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx | xxx
(1 row)

/**--- Collect the cancelled AUTOVACUUM information ---**/
server signaled
Expand Down
2 changes: 2 additions & 0 deletions test/script/function-logger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ SELECT
CASE WHEN duration IS NOT NULL THEN 'xxx' END AS duration
FROM
statsrepo.autovacuum
WHERE
schema = 'public'
ORDER BY
database, schema, "table";
EOF
Expand Down

0 comments on commit 51ddb82

Please sign in to comment.