Re: CLUSTER on partitioned index

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: 李杰(慎追) <adger(dot)lj(at)alibaba-inc(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, 曾文旌(义从) <wenjing(dot)zwj(at)alibaba-inc(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: CLUSTER on partitioned index
Date: 2020-11-16 01:53:35
Message-ID: 20201116015335.GB14024@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 04, 2020 at 08:23:56PM -0600, Justin Pryzby wrote:
> On Tue, Oct 27, 2020 at 07:33:12PM -0500, Justin Pryzby wrote:
> > I'm attaching a counter-proposal to your catalog change, which preserves
> > indisclustered on children of clustered, partitioned indexes, and invalidates
> > indisclustered when attaching unclustered indexes.
>
> ..and now propagates CLUSTER ON to child indexes.
>
> I left this as separate patches to show what I mean and what's new while we
> discuss it.

This fixes some omissions in the previous patch and error in its test cases.

CLUSTER ON recurses to children, since I think a clustered parent index means
that all its child indexes are clustered. "SET WITHOUT CLUSTER" doesn't have
to recurse to children, but I did it like that for consistency and it avoids
the need to special case InvalidOid.

--
Justin

Attachment Content-Type Size
v4-0001-Implement-CLUSTER-of-partitioned-table.patch text/x-diff 16.6 KB
v4-0002-Propagate-changes-to-indisclustered-to-child-pare.patch text/x-diff 9.3 KB
v4-0003-Invalidate-parent-indexes.patch text/x-diff 3.6 KB
v4-0004-Invalidate-parent-index-cluster-on-attach.patch text/x-diff 3.1 KB
v4-0005-Preserve-indisclustered-on-children-of-clustered-.patch text/x-diff 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2020-11-16 02:28:35 Re: Split copy.c
Previous Message Craig Ringer 2020-11-16 01:46:35 Re: Add docs stub for recovery.conf