Hi,
while playing with PostgreSQL 14 Beta 3 I noticed a change when it comes to the visibility map and vacuum. Test case:
gbench=# create table t1 ( a int, b text ) with ( fillfactor = 100 );
CREATE TABLE
pgbench=# insert into t1 select a, a::text from generate_series(1,1000000) a;
INSERT 0 1000000
pgbench=# create index i1 on t1 (a);
CREATE INDEX
gbench=# select ctid,* from t1 order by 1 limit 5;
ctid | a | b
-------+---+---
(0,1) | 1 | 1
(0,2) | 2 | 2
(0,3) | 3 | 3
(0,4) | 4 | 4
(0,5) | 5 | 5
(5 rows)
pgbench=# begin;
BEGIN
pgbench=*# update t1 set b ='xx' where a = 1;
UPDATE 1
pgbench=*# select ctid,* from t1 order by 1 limit 5;
ctid | a | b
-------+---+---
(0,2) | 2 | 2
(0,3) | 3 | 3
(0,4) | 4 | 4
(0,5) | 5 | 5
(0,6) | 6 | 6
(5 rows)
pgbench=*# select ctid,* from t1 where a = 1;
ctid | a | b
---------+---+----
(4,203) | 1 | xx
(1 row)
pgbench=*# commit;
pgbench=# select pg_visibility_map('t1'::regclass, 0);
pg_visibility_map
-------------------
(f,f)
(1 row)
pgbench=# vacuum t1;
VACUUM
pgbench=# select pg_visibility_map('t1'::regclass, 0);
pg_visibility_map
-------------------
(f,f) <XXXXXXXXXXXXXXXXXXXXXXXX Why?
(1 row)
Versions before 14 (I did not test 14Beta1 and 14Beta2) changed the visibility bit to true after the vacuum. Did I miss
a"feature" or is this a bug?
Thanks in advance
Daniel