Re: CLUSTER on partitioned index

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 李杰(慎追) <adger(dot)lj(at)alibaba-inc(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, 曾文旌(义从) <wenjing(dot)zwj(at)alibaba-inc(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>
Subject: Re: CLUSTER on partitioned index
Date: 2022-03-31 14:11:12
Message-ID: 20220331141112.GO28503@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 31, 2022 at 12:54:36PM +0200, Alvaro Herrera wrote:
> I realized after posting that we used to allow clustering toast tables,
> but after my changes we no longer do. (Justin's version had a
> RELKIND_HAS_STORAGE test here instead, which seemed a little too lax.) I
> don't know why we allowed it and I don't know of anyone who has ever
> used that feature and we don't have any test coverage for it, but I
> don't have any reason to explicitly disallow it either. So I propose to
> continue to allow it:

Good catch.

My daily vacuum script would've discovered that they're no longer supported, as
it tests for (among other things) c.relkind IN ('r','t'). That clusters tables
that have an indisclustered set and vacuums various others. (BTW, it's the
same script that discovered in 2019 that clustering on expressional indexes had
been broken by the heapam changes).

I think the response should be to add a test case, which could be 0001 or
00099.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-03-31 14:11:41 Re: Commitfest Update
Previous Message Justin Pryzby 2022-03-31 14:10:53 Re: CLUSTER on partitioned index