Why doesn't Vacuum FULL update the VM - Mailing list pgsql-hackers

From Melanie Plageman
Subject Why doesn't Vacuum FULL update the VM
Date
Msg-id CAAKRu_YxYQo1Ym0w_jvXK5wCtDrQpmGGLAtzWM=aPWsMuy2rOw@mail.gmail.com
Whole thread Raw
Responses Re: Why doesn't Vacuum FULL update the VM
Re: Why doesn't Vacuum FULL update the VM
List pgsql-hackers
Hi,

I noticed that VACUUM FULL actually does freeze the tuples in the
rewritten table (heap_freeze_tuple()) but then it doesn't mark them
all visible or all frozen in the visibility map. I don't understand
why. It seems like it would save us future work.

Here is an example:

create extension pg_visibility;
drop table if exists foo;
create table foo(a int) with (autovacuum_enabled=false);
insert into foo select i%3 from generate_series(1,300)i;
update foo set a = 5 where a = 2;
select * from pg_visibility_map_summary('foo');
vacuum (verbose) foo;
select * from pg_visibility_map_summary('foo');
vacuum (full, verbose) foo;
select * from pg_visibility_map_summary('foo');

I don't see why the visibility map shouldn't be updated so that all of
the pages show all visible and all frozen for this relation after the
vacuum full.

- Melanie



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Eager page freeze criteria clarification
Next
From: Nathan Bossart
Date:
Subject: Re: Add 'worker_type' to pg_stat_subscription