Re: how to investigate GIN fast updates and cleanup cycles?

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: how to investigate GIN fast updates and cleanup cycles?
Дата
Msg-id CAMkU=1yQkqOk6oV_neFJZFTGRBp7as4AQ9ej-XEQ0ajJasCnog@mail.gmail.com
обсуждение исходный текст
Ответ на Re: how to investigate GIN fast updates and cleanup cycles?  (Steve Kehlet <steve.kehlet@gmail.com>)
Ответы Re: how to investigate GIN fast updates and cleanup cycles?
Список pgsql-general
On Fri, Aug 28, 2015 at 11:06 AM, Steve Kehlet <steve.kehlet@gmail.com> wrote:
On Fri, Aug 28, 2015 at 10:42 AM Jeff Janes <jeff.janes@gmail.com> wrote:
  
Vacuum is overkill (and can be extremely slow to run a large gin index), you just need to get it to autoanalyze by changing the per-table setting of "autovacuum_vacuum_scale_factor" to zero and instead using

Did you mean autovacuum_analyze_scale_factor or does it not matter?

I'm trying to force an autovacuum/autoanalyze this way but unfortunately for me I have autovacuum_max_workers at the default of 3 and there are apparently many tables in line for autovacuuming in front of the table I want :-(. I'm playing whack-a-mole killing them and hoping the table I want will come up.

I overlooked the significance of this paragraph the first time I responded.  Did you change the system-wide autovacuum_analyze_scale_factor?  If so, don't do that.  You can use a table's storage parameters to set a custom autovacuum_analyze_scale_factor just for individual tables.  So just the table with the troublesome gin index:

alter table some_table_with_gin_index set (autovacuum_analyze_scale_factor =0);
alter table some_table_with_gin_index set (autovacuum_analyze_threshold =100);
 
Killing existing vacuums won't help (at least not until change your system wide setting back and so the above instead) because it will likely just restart on the same table it was on when you killed it.

Cheers,

Jeff

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

Предыдущее
От: Dominik Czarnota
Дата:
Сообщение: Re: Does PLPythonU support COPY table FROM string?
Следующее
От: Steve Kehlet
Дата:
Сообщение: Re: how to investigate GIN fast updates and cleanup cycles?