Re: Vacuum: allow usage of more than 1GB of work mem

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Vacuum: allow usage of more than 1GB of work mem
Дата
Msg-id CANP8+jJQ2ZXVDwWQ6+74_t-7cZkh1EVNKi9pBx5qKs=NaYChUQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Vacuum: allow usage of more than 1GB of work mem  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Vacuum: allow usage of more than 1GB of work mem  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
On 6 September 2016 at 19:59, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> The idea of looking to the stats to *guess* about how many tuples are
> removable doesn't seem bad at all.  But imagining that that's going to be
> exact is folly of the first magnitude.

Yes.  Bear in mind I had already referred to allowing +10% to be safe,
so I think we agree that a reasonably accurate, yet imprecise
calculation is possible in most cases.

If a recent transaction has committed, we will see both committed dead
rows and stats to show they exist. I'm sure there are corner cases and
race conditions where a major effect (greater than 10%) could occur,
in which case we run the index scan more than once, just as we do now.

The attached patch raises the limits as suggested by Claudio, allowing
for larger memory allocations if possible, yet limits the allocation
for larger tables based on the estimate gained from pg_stats, while
adding 10% for caution.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Kuntal Ghosh
Дата:
Сообщение: Re: WAL consistency check facility
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL