Re: CLUSTER on partitioned index - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: CLUSTER on partitioned index
Date
Msg-id CALNJ-vQ=Nc7wAP+LzhNNJCQSLoxUhGLQDA5JxErm8eLU+ppd_A@mail.gmail.com
Whole thread Raw
In response to CLUSTER on partitioned index  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Hi,
For v10-0002-Implement-CLUSTER-of-partitioned-table.patch :

or that an partitioned index was previously set clustered.

'an partitioned index' -> a partitioned index

+ * Return a List of tables and associated index, where each index is a

associated index -> associated indices

For cluster():
-       rel = table_open(tableOid, NoLock);
+       rel = table_open(tableOid, ShareUpdateExclusiveLock);

Considering the comment preceding cluster() (forced to acquire exclusive locks on all the tables), maybe add a comment explaining why it is safe to take ShareUpdateExclusiveLock.

+cluster_multiple_rels(List *rvs, int options)

I think the multiple in the method name is not needed since the relation is in plural.

Cheers

On Fri, Apr 2, 2021 at 1:03 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
@cfbot: rebased

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: [PATCH] Implement motd for PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: SP-GiST confusion: indexed column's type vs. index column type