Re: CLUSTER on partitioned index

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, 李杰(慎追) <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-04-16 11:58:50
Message-ID: YlqveniXn9AI6RFZ@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 14, 2022 at 10:37:06PM +0200, Alvaro Herrera wrote:
> Thanks for the patch -- I have pushed it now, with some wording changes
> and renaming the role to regress_* to avoid buildfarm's ire.

Cool, thanks.

> Michaël in addition proposes an isolation test. I'm not sure; is it
> worth the additional test run time? It doesn't seem a critical issue.
> But if anybody feels like contributing one, step right ahead.

Well, I am a bit annoyed that we don't actually check that a CLUSTER
command does not block when doing a CLUSTER on a partitioned table
while a lock is held on one of its partitions. So, attached is a
proposal of patch to improve the test coverage in this area. While on
it, I have added a test with a normal table. You can see the
difference once you remove the ACL check added recently in
get_tables_to_cluster_partitioned(). What do you think?
--
Michael

Attachment Content-Type Size
0001-Add-isolation-tests-for-CLUSTER-with-partitions.patch text/x-diff 7.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-04-16 12:29:20 Re: TRAP: FailedAssertion("tabstat->trans == trans", File: "pgstat_relation.c", Line: 508
Previous Message Erik Rijkers 2022-04-16 07:37:55 TRAP: FailedAssertion("tabstat->trans == trans", File: "pgstat_relation.c", Line: 508