Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb940918

Browse files
committed
Remove "recheck" argument from check_index_is_clusterable()
The last usage of this argument in this routine can be tracked down to7e2f906, aka 11 years ago. Getting rid of this argument can also be anadvantage for extensions calling check_index_is_clusterable(), as itremoves any need to worry about the meaning of what a recheck would beat this level.Author: Justin PryzbyDiscussion:https://postgr.es/m/20220411140609.GF26620@telsasoft.com
1 parentfdc18ea commitb940918

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎src/backend/commands/cluster.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ cluster(ParseState *pstate, ClusterStmt *stmt, bool isTopLevel)
232232
if (rel!=NULL)
233233
{
234234
Assert(rel->rd_rel->relkind==RELKIND_PARTITIONED_TABLE);
235-
check_index_is_clusterable(rel,indexOid,true,AccessShareLock);
235+
check_index_is_clusterable(rel,indexOid,AccessShareLock);
236236
rtcs=get_tables_to_cluster_partitioned(cluster_context,indexOid);
237237

238238
/* close relation, releasing lock on parent table */
@@ -434,7 +434,7 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params)
434434

435435
/* Check heap and index are valid to cluster on */
436436
if (OidIsValid(indexOid))
437-
check_index_is_clusterable(OldHeap,indexOid,recheck,AccessExclusiveLock);
437+
check_index_is_clusterable(OldHeap,indexOid,AccessExclusiveLock);
438438

439439
/*
440440
* Quietly ignore the request if this is a materialized view which has not
@@ -480,7 +480,7 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params)
480480
* protection here.
481481
*/
482482
void
483-
check_index_is_clusterable(RelationOldHeap,OidindexOid,boolrecheck,LOCKMODElockmode)
483+
check_index_is_clusterable(RelationOldHeap,OidindexOid,LOCKMODElockmode)
484484
{
485485
RelationOldIndex;
486486

‎src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14055,7 +14055,7 @@ ATExecClusterOn(Relation rel, const char *indexName, LOCKMODE lockmode)
1405514055
indexName, RelationGetRelationName(rel))));
1405614056

1405714057
/* Check index is valid to cluster on */
14058-
check_index_is_clusterable(rel, indexOid,false,lockmode);
14058+
check_index_is_clusterable(rel, indexOid, lockmode);
1405914059

1406014060
/* And do the work */
1406114061
mark_index_clustered(rel, indexOid, false);

‎src/include/commands/cluster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ typedef struct ClusterParams
3434
externvoidcluster(ParseState*pstate,ClusterStmt*stmt,boolisTopLevel);
3535
externvoidcluster_rel(OidtableOid,OidindexOid,ClusterParams*params);
3636
externvoidcheck_index_is_clusterable(RelationOldHeap,OidindexOid,
37-
boolrecheck,LOCKMODElockmode);
37+
LOCKMODElockmode);
3838
externvoidmark_index_clustered(Relationrel,OidindexOid,boolis_internal);
3939

4040
externOidmake_new_heap(OidOIDOldHeap,OidNewTableSpace,OidNewAccessMethod,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp