From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Ilya Gladyshev <ilya(dot)v(dot)gladyshev(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: REINDEX not updating partition progress |
Date: | 2024-07-25 08:55:19 |
Message-ID: | ZqIS96vKtMR4g3o7@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2024-07-25 09:36:57 | Re: improve ssl error code, 2147483650 |
Previous Message | Michael Paquier | 2024-07-25 08:38:07 | Re: PG buildfarm member cisticola |