Re: Progress report of CREATE INDEX for nested partitioned tables - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Progress report of CREATE INDEX for nested partitioned tables
Date
Msg-id 20221213044331.GJ27893@telsasoft.com
Whole thread Raw
In response to Re: Progress report of CREATE INDEX for nested partitioned tables  (Ilya Gladyshev <ilya.v.gladyshev@gmail.com>)
Responses Re: Progress report of CREATE INDEX for nested partitioned tables  (Ilya Gladyshev <ilya.v.gladyshev@gmail.com>)
List pgsql-hackers
On Mon, Dec 12, 2022 at 11:39:23PM +0400, Ilya Gladyshev wrote:
> 
> > Could you check what I've written as a counter-proposal ?
> 
> I think that this might be a good solution to start with, it gives us the opportunity to improve the granularity
laterwithout any surprising changes for the end user. We could use this patch for previous versions and make more
granularoutput in the latest. What do you think?
 

Somehow, it hadn't occured to me that my patch "lost granularity" by
incrementing the progress bar by more than one...  Shoot.

> I actually think that the progress view would be better off without the total number of partitions, 

Just curious - why ?

> With this in mind, I think your proposal to exclude catalog-only indexes sounds reasonable to me, but I feel like the
docsare off in this case, because the attached indexes are not created, but we pretend like they are in this metric, so
weshould fix one or the other.
 

I agree that the docs should indicate whether we're counting "all
partitions", "direct partitions", and whether or not that includes
partitioned partitions, or just leaf partitions.

I have another proposal: since the original patch 3.5 years ago didn't
consider or account for sub-partitions, let's not start counting them
now.  It was never defined whether they were included or not (and I
guess that they're not common) so we can take this opportunity to
clarify the definition.

Alternately, if it's okay to add nparts_done to the IndexStmt, then
that's easy.

-- 
Justin

Attachment

pgsql-hackers by date:

Previous
From: "Imseih (AWS), Sami"
Date:
Subject: Re: Add index scan progress to pg_stat_progress_vacuum
Next
From: "Takamichi Osumi (Fujitsu)"
Date:
Subject: RE: Time delayed LR (WAS Re: logical replication restrictions)