Re: Feature request (or at least discussion): enable autovaccum ontemp tables

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Feature request (or at least discussion): enable autovaccum ontemp tables
Дата
Msg-id CAFj8pRBJrANEGWJpcha1P9wHpAZm6Rv0ztCNj=uzgvSV4FGVjQ@mail.gmail.com
обсуждение исходный текст
Ответ на Feature request (or at least discussion): enable autovaccum on temp tables  (Ivan Voras <ivoras@gmail.com>)
Ответы Re: Feature request (or at least discussion): enable autovaccum ontemp tables  (Ivan Voras <ivoras@gmail.com>)
Список pgsql-general
Hi

pá 31. 5. 2019 v 17:26 odesílatel Ivan Voras <ivoras@gmail.com> napsal:
Hello,

The reason why we are using temp tables is to allow concurrent runs on some very large reports which involve creating and heavily churning dozens of very large tables.

The problem we're facing is that if we DON'T use temp tables, the reports finish in a couple of hours. If we DO use temp tables, they finish in a couple of weeks. While using regular tables, autovacuum runs pretty much continuously.

We'll try manually vacuuming the tables after major operations, but that's kind of kludgy. What would help is a GUC setting which toggles this behaviour.

Since AFAIK temp tables are very close to unlogged ordinary tables, what would stop this feature from being implemented?

I agree so this is not consistent behave. On second hand, for almost temp table usage using autovacuum has not benefit.

autovacuum check tables once per minute, and working on closed transactions. Lot of times temporary tables are filled inside some batch, and immediately some query is started over this table. It is very low probability to analyze temp table at good time automatically. So only explicit call of ANALYZE is correct solution.

Regards

Pavel


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

Предыдущее
От: Ivan Voras
Дата:
Сообщение: Feature request (or at least discussion): enable autovaccum on temp tables
Следующее
От: Ivan Voras
Дата:
Сообщение: Re: Feature request (or at least discussion): enable autovaccum ontemp tables