Skip to content

Commit

Permalink
[#23314] YSQL: Fix variable name to yb_ for ATPrepSetTableSpace
Browse files Browse the repository at this point in the history
Summary:
Renamed the cascade variable to yb_cascade in ATPrepSetTableSpace, as it is a YugabyteDB-specific parameter introduced in commit 06baaf0 / D37055.

Jira: DB-12239

Test Plan: ./yb_build.sh --java-test org.yb.pgsql.TestPgRegressColocatedTablesWithTablespaces#testPgRegressColocatedTablesWithTablespaces

Reviewers: jason

Reviewed By: jason

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D38170
  • Loading branch information
utkarsh-um-yb committed Sep 19, 2024
1 parent 885b72b commit f4a002a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/postgres/src/backend/commands/tablecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ static ObjectAddress ATExecClusterOn(Relation rel, const char *indexName,
static void ATExecDropCluster(Relation rel, LOCKMODE lockmode);
static bool ATPrepChangePersistence(Relation rel, bool toLogged);
static void ATPrepSetTableSpace(AlteredTableInfo *tab, Relation rel,
const char *tablespacename, LOCKMODE lockmode, bool cascade);
const char *tablespacename, LOCKMODE lockmode,
bool yb_cascade);
static void ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode);
static void ATExecSetTableSpaceNoStorage(Relation rel, Oid newTableSpace);
static void ATExecSetRelOptions(Relation rel, List *defList,
Expand Down Expand Up @@ -12125,7 +12126,8 @@ ATExecDropCluster(Relation rel, LOCKMODE lockmode)
*/
static void
ATPrepSetTableSpace(AlteredTableInfo *tab, Relation rel,
const char *tablespacename, LOCKMODE lockmode, bool cascade)
const char *tablespacename, LOCKMODE lockmode,
bool yb_cascade)
{
Oid tablespaceId;

Expand Down Expand Up @@ -12153,7 +12155,7 @@ ATPrepSetTableSpace(AlteredTableInfo *tab, Relation rel,
errmsg("cannot set tablespace for primary key index")));
}

if (IsYugaByteEnabled() && !cascade && MyDatabaseColocated &&
if (IsYugaByteEnabled() && !yb_cascade && MyDatabaseColocated &&
YbGetTableProperties(rel)->is_colocated)
{
/*
Expand Down

0 comments on commit f4a002a

Please sign in to comment.