Re: lazy vacuum sleeps with exclusive lock on table

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: lazy vacuum sleeps with exclusive lock on table
Дата
Msg-id 20070629091438.7C11.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: lazy vacuum sleeps with exclusive lock on table  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: lazy vacuum sleeps with exclusive lock on table  ("Simon Riggs" <simon@2ndquadrant.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> wrote:

> What I'm requesting here is that the sleep in count_nondeletable_pages()
> be removed and that change backpatched to 8.2 and 8.1.

Agreed. We'd better to shorten the exclusive locking as far as possible.

> We don't know how many pages we can truncate until after we have
> acquired the exclusive lock and examined the pages in question, scanning
> backwards from the end of the table.

But many OSes do not care about read-ahead in backward scanning. I have
a test result that shows truncating a large part of table takes very long
time. Is it better better to change it to forward scanning? For example,
starting with (tail of the file - 16MB) and scanning 16MB of segment forward
to decide the position for truncation. If we can truncate all of the segment,
do recheck from (tail of the file - 32MB) and repeat.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: write past chunk end in ExprContext / to_char
Следующее
От: Tom Lane
Дата:
Сообщение: Re: lazy vacuum sleeps with exclusive lock on table