Re: REINDEXdb performance degrading gradually PG13.4 - Mailing list pgsql-performance

From Michael Paquier
Subject Re: REINDEXdb performance degrading gradually PG13.4
Date
Msg-id YpbtEfXC7X1llLk+@paquier.xyz
Whole thread Raw
In response to REINDEXdb performance degrading gradually PG13.4  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-performance
On Tue, May 31, 2022 at 08:42:06AM -0700, David G. Johnston wrote:
> Building indexes is so IO heavy that the non-IO bottlenecks that exists
> likely have minimal impact on the overall times this rebuild everything
> will take.  That said, I’ve never done anything at this scale before.  I
> wouldn’t be too surprised if per-session cache effects are coming into play
> given the number of objects involved and the assumption that each session
> used for parallelism is persistent.  I’m not sure how the parallelism works
> for managing the work queue though as it isn’t documented and I haven’t
> inspected the source code.

get_parallel_object_list() in reindexdb.c would give the idea, where
the list of tables to rebuild are ordered based on an "ORDER BY
c.relpages DESC", then the table queue is processed with its own
command, moving on to the next item once we are done with an item in
the list.
--
Michael

Attachment

pgsql-performance by date:

Previous
From: Goti
Date:
Subject: Logical reads
Next
From: Praneel Devisetty
Date:
Subject: Re: REINDEXdb performance degrading gradually PG13.4