1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

Disable vacuum page skipping in selected test cases.

By default VACUUM will skip pages that it can't immediately get
exclusive access to, which means that even activities as harmless
and unpredictable as checkpoint buffer writes might prevent a page
from being processed.  Ordinarily this is no big deal, but we have
a small number of test cases that examine the results of VACUUM's
processing and therefore will fail if the page of interest is skipped.
This seems to be the explanation for some rare buildfarm failures.
To fix, add the DISABLE_PAGE_SKIPPING option to the VACUUM commands
in tests where this could be an issue.

In passing, remove a duplicated query in pageinspect/sql/page.sql.

Back-patch as necessary (some of these cases are as old as v10).

Discussion: https://postgr.es/m/413923.1611006484@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2021-01-20 11:49:29 -05:00
parent 1c3a4d44d8
commit 6a97ca3128
4 changed files with 8 additions and 8 deletions

View File

@ -3,7 +3,7 @@ CREATE EXTENSION pageinspect;
CREATE TABLE test1 (a int, b int);
INSERT INTO test1 VALUES (16777217, 131584);
VACUUM test1; -- set up FSM
VACUUM (DISABLE_PAGE_SKIPPING) test1; -- set up FSM
-- The page contents can vary, so just test that it can be read
-- successfully, but don't keep the output.