From: | Ilya Gladyshev <ilya(dot)v(dot)gladyshev(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Progress report of CREATE INDEX for nested partitioned tables |
Date: | 2022-12-10 08:18:32 |
Message-ID: | a15f904a70924ffa4ca25c3c744cff31e0e6e143.camel@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I have noticed that progress reporting for CREATE INDEX of partitioned
tables seems to be working poorly for nested partitioned tables. In
particular, it overwrites total and done partitions count when it
recurses down to child partitioned tables and it only reports top-level
partitions. So it's not hard to see something like this during CREATE
INDEX now:
postgres=# select partitions_total, partitions_done from
pg_stat_progress_create_index ;
partitions_total | partitions_done
------------------+-----------------
1 | 2
(1 row)
I changed current behaviour to report the total number of partitions in
the inheritance tree and fixed recursion in the attached patch. I used
a static variable to keep the counter to avoid ABI breakage of
DefineIndex, so that we could backpatch this to previous versions.
Thanks,
Ilya Gladyshev
Attachment | Content-Type | Size |
---|---|---|
0001-report-top-parent-progress-for-CREATE-INDEX.patch | text/x-patch | 2.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Drouvot, Bertrand | 2022-12-10 09:54:44 | Re: Split index and table statistics into different types of stats |
Previous Message | Drouvot, Bertrand | 2022-12-10 08:09:27 | Re: Minimal logical decoding on standbys |