pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Manu <manuelreyesbravo@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Kirill Reshke <reshkekirill@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Fix reindexdb with parallel index-level conrurrent run
Date: Mon, 05 Oct 2026 16:42:21 -0300
Message-ID: <179122934183.429794.212586221593626226@gmail.com> (raw)
In-Reply-To: <asMQ590DE7VsaVDc@paquier.xyz>
References: <asMQ590DE7VsaVDc@paquier.xyz>

Hi Michael,

> so I'd wonder about just returning an error first

Agreed.  The only case that fails is two or more of the named indexes
sharing a table with -j >= 2 (they batch into one multi-statement query).
And for that case --jobs cannot parallelize anyway: the indexes of one
table have to be reindexed one at a time to avoid deadlocks.  So fixing the
parallel path unlocks no speed, it only removes the error.  Erroring out
looks right to me; a clear message would beat today's "cannot run inside a
transaction block".  Happy to write that.

Regards,
Manu






view thread (9+ messages)  latest in thread

Message-ID: <179122934183.429794.212586221593626226@gmail.com>
Permalink:  ../179122934183.429794.212586221593626226@gmail.com/
Also on:    postgresql.org/message-id/179122934183.429794.212586221593626226@gmail.com

 · 

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: pgsql-hackers@postgresql.org
  Cc: manuelreyesbravo@gmail.com, michael@paquier.xyz, reshkekirill@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Fix reindexdb with parallel index-level conrurrent run
  In-Reply-To: <179122934183.429794.212586221593626226@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox