public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alexander Korotkov <[email protected]>
To: Álvaro Herrera <[email protected]>
Cc: Alexander Korotkov <[email protected]>
Cc: [email protected]
Cc: Maxim Orlov <[email protected]>
Cc: Svetlana Derevyanko <[email protected]>
Subject: Re: pgsql: reindexdb: Add the index-level REINDEX with multiple jobs
Date: Sat, 8 Mar 2025 12:49:35 +0200
Message-ID: <CAPpHfdteHycyc2WjXx06kseek3YO_Yaii158i3wOkwm82=HMyg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

On Fri, Mar 7, 2025 at 8:20 PM Álvaro Herrera <[email protected]> wrote:
>
> On 2024-Mar-25, Alexander Korotkov wrote:
>
> > reindexdb: Add the index-level REINDEX with multiple jobs
> >
> > Straight-forward index-level REINDEX is not supported with multiple jobs as
> > we cannot control the concurrent processing of multiple indexes depending on
> > the same relation.  Instead, we dedicate the whole table to certain reindex
> > job.  Thus, if indexes in the lists belong to different tables, that gives us
> > a fair level of parallelism.
>
> I tested this, because of a refactoring suggestion [1] and I find that
> it's rather completely broken.

The code was written with assumption that running
run_reindex_command() with async == true can schedule a number of
queries for a connection.  But actually that's not true and everything
is broken.

------
Regards,
Alexander Korotkov
Supabase





view thread (11+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgsql: reindexdb: Add the index-level REINDEX with multiple jobs
  In-Reply-To: <CAPpHfdteHycyc2WjXx06kseek3YO_Yaii158i3wOkwm82=HMyg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox