mirror of
https://github.com/postgres/postgres.git
synced 2026-05-25 02:40:42 -04:00
Stabilize btree_gist test against on-access VM setting
The btree_gist enum test expects a bitmap heap scan. Sinceb46e1e54d0enabled setting the VM during on-access pruning and378a21618set pd_prune_xid on INSERT, scans of enumtmp may set pages all-visible. If autovacuum or autoanalyze then updates pg_class.relallvisible, the planner could choose an index-only scan instead. Make the enumtmp a temp table to exclude it from autovacuum/autoanalyze. Reported-by: Alexander Lakhin <exclusion@gmail.com> Author: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/46733d68-aec0-4d09-8120-4c66b87047a4%40gmail.com
This commit is contained in:
parent
85ae8ab053
commit
62407d26b7
2 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ create type rainbow as enum ('r','o','g','b','i','v');
|
|||
-- enum values added later take some different codepaths internally,
|
||||
-- so make sure we have coverage for those too
|
||||
alter type rainbow add value 'y' before 'g';
|
||||
CREATE TABLE enumtmp (a rainbow);
|
||||
CREATE TEMPORARY TABLE enumtmp (a rainbow);
|
||||
\copy enumtmp from 'data/enum.data'
|
||||
SET enable_seqscan=on;
|
||||
select a, count(*) from enumtmp group by a order by 1;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ create type rainbow as enum ('r','o','g','b','i','v');
|
|||
-- so make sure we have coverage for those too
|
||||
alter type rainbow add value 'y' before 'g';
|
||||
|
||||
CREATE TABLE enumtmp (a rainbow);
|
||||
CREATE TEMPORARY TABLE enumtmp (a rainbow);
|
||||
|
||||
\copy enumtmp from 'data/enum.data'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue