REINDEX not updating partition progress

From: Ilya Gladyshev <ilya(dot)v(dot)gladyshev(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: REINDEX not updating partition progress
Date: 2024-07-12 22:07:49
Message-ID: b72f2d89-820a-4fa2-9058-b155cf646f4f@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While working on CIC for partitioned tables [1], I noticed that REINDEX
for partitioned tables is not tracking keeping progress of partitioned
tables, so I'm creating a separate thread for this fix as suggested.

The way REINDEX for partitioned tables works now ReindexMultipleInternal
treats every partition as an independent table without keeping track of
partition_done/total counts, because this is just generic code for
processing multiple tables. The patch addresses that by passing down the
knowledge a flag to distinguish partitions from independent tables
in ReindexMultipleInternal and its callees. I also noticed that the
partitioned CREATE INDEX progress tracking could also benefit from
progress_index_partition_done function that zeroizes params in addition
to incrementing the counter, so I applied it there as well.

[1]
https://www.postgresql.org/message-id/55cfae76-2ffa-43ed-a7e7-901bffbebee4%40gmail.com

Attachment Content-Type Size
0001-make-REINDEX-track-partition-progress.patch text/x-patch 7.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melih Mutlu 2024-07-12 22:11:52 Re: Parent/child context relation in pg_get_backend_memory_contexts()
Previous Message Jeff Davis 2024-07-12 21:50:52 Re: MAINTAIN privilege -- what do we need to un-revert it?