From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
Cc: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Ilya Gladyshev <ilya(dot)v(dot)gladyshev(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Progress report of CREATE INDEX for nested partitioned tables |
Date: | 2023-03-13 00:15:28 |
Message-ID: | 1634535.1678666528@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> Justin Pryzby <pryzby(at)telsasoft(dot)com> writes:
>> count_leaf_partitions() is also called for sub-partitions, in the case
>> that a matching "partitioned index" already exists, and the progress
>> report needs to be incremented by the number of leaves for which indexes
>> were ATTACHED.
> Can't you increment progress by one at the point where the actual attach
> happens?
Oh, never mind; now I realize that the point is that you didn't ever
iterate over those leaf indexes.
However, consider a thought experiment: assume for whatever reason that
all the actual index builds happen first, then all the cases where you
succeed in attaching a sub-partitioned index happen at the end of the
command. In that case, the percentage-done indicator would go from
some-number to 100% more or less instantly.
What if we simply do nothing at sub-partitioned indexes? Or if that's
slightly too radical, just increase the PARTITIONS_DONE counter by 1?
That would look indistinguishable from the case where all the attaches
happen at the end.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-03-13 01:06:34 | Re: Requiring recovery.signal or standby.signal when recovering with a backup_label |
Previous Message | Tom Lane | 2023-03-12 22:25:13 | Re: Progress report of CREATE INDEX for nested partitioned tables |