Odd VACUUM behavior when it is expected to truncate last empty pages

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Odd VACUUM behavior when it is expected to truncate last empty pages
Дата
Msg-id CAL_0b1sQytEusUSnY3Wv=Wh4MePof15TTA0KDKyuNaX_9YRmAA@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hi all,

I have PostgreSQL 9.0.3 installed on my Gentoo Linux box. The
configuration is default. There is no any activity in the database but
the described below.

What I am trying to achieve is the effect described in this article
http://blog.endpoint.com/2010/09/reducing-bloat-without-locking.html.
In short I am updating last pages of a table to move the tuples to the
earlier pages to make VACUUM able to truncate the empty tail. However
I faced a strange VACUUM behavior. So the situation is:

1. do some UPDATEs on the table so it has several last pages free,
2. perform VACUUM of this table the 1st time, no tail pages will be
truncated (why?),
3. perform VACUUM the 2nd time straight after the 1st one and it will
truncate the tail pages (why this time?).

The case is stable.

Could anybody explain why it could happen, please?

Here is the VACUUMs verbose http://pastebin.com/RjuDmabV

--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray.ru@gmail.com / Skype: gray-hemp

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Graham
Дата:
Сообщение: Vacuum as "easily obtained" locks
Следующее
От: Andy Colson
Дата:
Сообщение: Re: Vacuum as "easily obtained" locks