Re: Index recreation details with REINDEX TABLE CONCURRENTLY

Поиск
Список
Период
Сортировка
От Matthew Planchard
Тема Re: Index recreation details with REINDEX TABLE CONCURRENTLY
Дата
Msg-id CAFw+HFSCH53-upkPVmSuthUv80a991g7GpgyepZh29VJevykMA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Index recreation details with REINDEX TABLE CONCURRENTLY  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-admin
That’s great, thank you very much!

On Thu, May 11, 2023 at 11:09 Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Wed, 2023-05-10 at 10:04 -0500, Matthew Planchard wrote:
> We're working on setting up some regular jobs to reindex tables where we
> wind up generating a lot of index bloat. We're planning on using REINDEX
> ... CONCURRENTLY. We'd like to reindex all of the indexes on the tables.
>
> In some of our environments, these tables are very large and under high
> load, and we want to minimize the resource consumption of index
> recreation if possible.
>
> With that in mind, my question is: does REINDEX TABLE CONCURRENTLY
> operate on the indexes of the table in parallel, or sequentially? If
> in parallel, I imagine we would see less DB resource utilization by
> updating one index at a time.

If you use REINDEX TABLE CONCURRENTLY, the indexes will be built one
after the other.  Set "max_parallel_maintenance_workers" to 0 to keep
the resource utilization low (at the price of a longer duration).

Yours,
Laurenz Albe

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

Предыдущее
От: Katherine Mcmillan
Дата:
Сообщение: Re: Index recreation details with REINDEX TABLE CONCURRENTLY
Следующее
От: kyle Hailey
Дата:
Сообщение: ATTACH PARTITION "hangs"