Why doesn't Vacuum FULL update the VM

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Why doesn't Vacuum FULL update the VM
Дата
Msg-id CAAKRu_YxYQo1Ym0w_jvXK5wCtDrQpmGGLAtzWM=aPWsMuy2rOw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Why doesn't Vacuum FULL update the VM  (Vik Fearing <vik@postgresfriends.org>)
Re: Why doesn't Vacuum FULL update the VM  (Peter Geoghegan <pg@bowt.ie>)
Список 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 по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Eager page freeze criteria clarification
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Add 'worker_type' to pg_stat_subscription