diff --git a/src/backend/columnar/columnar_tableam.c b/src/backend/columnar/columnar_tableam.c index af964402b..de28cea79 100644 --- a/src/backend/columnar/columnar_tableam.c +++ b/src/backend/columnar/columnar_tableam.c @@ -2020,7 +2020,7 @@ columnar_tableam_init() NULL, &EnableVersionChecksColumnar, true, - PGC_SUSET, + PGC_USERSET, GUC_NO_SHOW_ALL, NULL, NULL, NULL); } @@ -2417,59 +2417,6 @@ ColumnarProcessUtility(PlannedStmt *pstmt, } } - if (IsA(parsetree, CreateExtensionStmt)) - { - CreateExtensionStmt *createExtensionStmt = castNode(CreateExtensionStmt, - parsetree); - - if (get_extension_oid("citus_columnar", true) == InvalidOid) - { - if (strcmp(createExtensionStmt->extname, "citus_columnar") == 0) - { - DefElem *newVersionValue = GetExtensionOption( - createExtensionStmt->options, - "new_version"); - if (newVersionValue) - { - const char *newVersion = defGetString(newVersionValue); - if (strcmp(newVersion, "11.1-0") == 0) - { - ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg( - "unsupported citus_columnar version 11.1-0"))); - } - } - - /*latest citus requires install columnar first, existing citus can only be an older version */ - if (get_extension_oid("citus", true) != InvalidOid) - { - ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg( - "must upgrade citus to version 11.1-1 first"))); - } - } - } - } - - if (IsA(parsetree, AlterExtensionStmt)) - { - AlterExtensionStmt *alterExtensionStmt = castNode(AlterExtensionStmt, parsetree); - if (strcmp(alterExtensionStmt->extname, "citus_columnar") == 0) - { - DefElem *newVersionValue = GetExtensionOption(alterExtensionStmt->options, - "new_version"); - if (newVersionValue) - { - const char *newVersion = defGetString(newVersionValue); - if (strcmp(newVersion, "11.1-0") == 0) - { - ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("unsupported citus_columnar version 11.1-0"))); - } - } - } - } - PrevProcessUtilityHook_compat(pstmt, queryString, false, context, params, queryEnv, dest, completionTag); diff --git a/src/backend/distributed/sql/downgrades/citus--11.0-2--11.0-1.sql b/src/backend/distributed/sql/downgrades/citus--11.0-2--11.0-1.sql index 6569f4bbc..6b409693f 100644 --- a/src/backend/distributed/sql/downgrades/citus--11.0-2--11.0-1.sql +++ b/src/backend/distributed/sql/downgrades/citus--11.0-2--11.0-1.sql @@ -16,3 +16,4 @@ DROP FUNCTION pg_catalog.run_command_on_coordinator(text,boolean); DROP FUNCTION pg_catalog.start_metadata_sync_to_all_nodes(); DROP FUNCTION pg_catalog.citus_finalize_upgrade_to_citus11(boolean); +#include "../udfs/citus_finalize_upgrade_to_citus11/11.0-1.sql"