Behavior change in PostgreSQL 14Beta3 or bug?

From: "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Behavior change in PostgreSQL 14Beta3 or bug?
Date: 2021-09-06 14:18:16
Message-ID: ZR0P278MB0920DD8896094F105A2521C3D2D29@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2021-09-06 14:46:14 Re: Behavior change in PostgreSQL 14Beta3 or bug?
Previous Message David G. Johnston 2021-09-06 14:13:07 Re: update non-indexed value is slow if some non-related index/fk are enabled