public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Ilya Gladyshev <[email protected]>
Cc: [email protected]
Subject: Re: REINDEX not updating partition progress
Date: Thu, 25 Jul 2024 17:55:19 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On Sun, Jul 21, 2024 at 11:41:43AM +0100, Ilya Gladyshev wrote:
> Forgot to update partition_relid in reindex_index in the second patch. Fixed in attachment.

        <structfield>relid</structfield> <type>oid</type>
       </para>
       <para>
-       OID of the table on which the index is being created.
+       OID of the table on which the command was run.
       </para></entry>

Hmm.  I am not sure if we really need to change the definition of this
field, because it can have the same meaning when using a REINDEX on a
partitioned table, pointing to the parent table (the partition) of the
index currently rebuilt.

Hence, rather than a partition_relid, could a partitioned_relid
reflect better the situation, set only when issuing a REINDEX on a
partitioned relation?

+   if (relkind == RELKIND_PARTITIONED_INDEX)
+   {
+       heapId = IndexGetRelation(relid, true);
+   }
Shouldn't we report the partitioned index OID rather than its parent
table when running a REINDEX on a partitioned index?
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
  download

view thread (3+ 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]
  Subject: Re: REINDEX not updating partition progress
  In-Reply-To: <[email protected]>

* 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