From b5d159197586a66d8678b94f885c24151bb44825 Mon Sep 17 00:00:00 2001 From: TotaJ Date: Mon, 3 Aug 2020 11:19:25 +0800 Subject: [PATCH 1/3] Fix select into return no results in some cases(mysql_fdw). --- .../huawei_mysql_fdw-2.5.3_patch.patch | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/third_party/dependency/mysql_fdw/huawei_mysql_fdw-2.5.3_patch.patch b/third_party/dependency/mysql_fdw/huawei_mysql_fdw-2.5.3_patch.patch index 1120eb1bd..87a235d63 100644 --- a/third_party/dependency/mysql_fdw/huawei_mysql_fdw-2.5.3_patch.patch +++ b/third_party/dependency/mysql_fdw/huawei_mysql_fdw-2.5.3_patch.patch @@ -1,5 +1,5 @@ diff --git Makefile Makefile -index d5e7b36..34667e1 100644 +index d5e7b362..34667e12 100644 --- Makefile +++ Makefile @@ -31,6 +31,8 @@ else @@ -41,7 +41,7 @@ index d5e7b36..34667e1 100644 endif diff --git connection.cpp connection.cpp -index a517a73..3fc2f20 100644 +index a517a738..3fc2f201 100644 --- connection.cpp +++ connection.cpp @@ -24,6 +24,7 @@ @@ -106,7 +106,7 @@ index a517a73..3fc2f20 100644 /* diff --git deparse.cpp deparse.cpp -index a75c270..94b1799 100644 +index a75c2705..94b1799c 100644 --- deparse.cpp +++ deparse.cpp @@ -20,7 +20,7 @@ @@ -226,7 +226,7 @@ index a75c270..94b1799 100644 } appendStringInfoChar(buf, ']'); diff --git mysql_fdw.cpp mysql_fdw.cpp -index d518e2e..a56fae6 100644 +index d518e2ec..a56fae67 100644 --- mysql_fdw.cpp +++ mysql_fdw.cpp @@ -53,7 +53,7 @@ @@ -509,7 +509,7 @@ index d518e2e..a56fae6 100644 if (festate && festate->stmt) { diff --git mysql_fdw.h mysql_fdw.h -index 5b543cd..ea58af7 100644 +index 5b543cd0..ea58af7f 100644 --- mysql_fdw.h +++ mysql_fdw.h @@ -135,31 +135,31 @@ extern bool is_foreign_expr(PlannerInfo *root, @@ -592,7 +592,7 @@ index 5b543cd..ea58af7 100644 /* option.c headers */ diff --git mysql_query.cpp mysql_query.cpp -index 8c25f5c..6093a5a 100644 +index 8c25f5cc..64fd770a 100644 --- mysql_query.cpp +++ mysql_query.cpp @@ -21,7 +21,7 @@ @@ -621,18 +621,19 @@ index 8c25f5c..6093a5a 100644 } /* -@@ -238,8 +239,8 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -238,8 +239,9 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i /* Clear the bind buffer and attributes */ memset(&binds[attnum], 0x0, sizeof(MYSQL_BIND)); - binds[attnum].buffer_type = mysql_from_pgtyp(type); - binds[attnum].is_null = isnull; + binds[attnum].buffer_type = (enum_field_types)mysql_from_pgtyp(type); -+ binds[attnum].is_null = (my_bool*)isnull; ++ binds[attnum].is_null = (my_bool*)palloc(sizeof(my_bool)); ++ *(binds[attnum].is_null) = *isnull; /* Avoid to bind buffer in case value is NULL */ if (*isnull) -@@ -250,7 +251,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -250,7 +252,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i case INT2OID: { int16 dat = DatumGetInt16(value); @@ -641,7 +642,7 @@ index 8c25f5c..6093a5a 100644 memcpy(bufptr, (char*)&dat, sizeof(int16)); binds[attnum].buffer = bufptr; -@@ -259,7 +260,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -259,7 +261,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i case INT4OID: { int32 dat = DatumGetInt32(value); @@ -650,7 +651,7 @@ index 8c25f5c..6093a5a 100644 memcpy(bufptr, (char*)&dat, sizeof(int32)); binds[attnum].buffer = bufptr; -@@ -268,7 +269,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -268,7 +270,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i case INT8OID: { int64 dat = DatumGetInt64(value); @@ -659,7 +660,7 @@ index 8c25f5c..6093a5a 100644 memcpy(bufptr, (char*)&dat, sizeof(int64)); binds[attnum].buffer = bufptr; -@@ -277,7 +278,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -277,7 +279,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i case FLOAT4OID: { float4 dat = DatumGetFloat4(value); @@ -668,7 +669,7 @@ index 8c25f5c..6093a5a 100644 memcpy(bufptr, (char*)&dat, sizeof(float4)); binds[attnum].buffer = bufptr; -@@ -286,7 +287,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -286,7 +288,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i case FLOAT8OID: { float8 dat = DatumGetFloat8(value); @@ -677,7 +678,7 @@ index 8c25f5c..6093a5a 100644 memcpy(bufptr, (char*)&dat, sizeof(float8)); binds[attnum].buffer = bufptr; -@@ -296,7 +297,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -296,7 +298,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i { Datum valueDatum = DirectFunctionCall1(numeric_float8, value); float8 dat = DatumGetFloat8(valueDatum); @@ -686,7 +687,7 @@ index 8c25f5c..6093a5a 100644 memcpy(bufptr, (char*)&dat, sizeof(float8)); binds[attnum].buffer = bufptr; -@@ -305,7 +306,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -305,7 +307,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i case BOOLOID: { int32 dat = DatumGetInt32(value); @@ -695,7 +696,7 @@ index 8c25f5c..6093a5a 100644 memcpy(bufptr, (char*)&dat, sizeof(int32)); binds[attnum].buffer = bufptr; -@@ -348,7 +349,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -348,7 +350,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i Datum valueDatum = DirectFunctionCall1(date_timestamp, value); Timestamp valueTimestamp = DatumGetTimestamp(valueDatum); @@ -704,7 +705,7 @@ index 8c25f5c..6093a5a 100644 timestamp2tm(valueTimestamp, &tz, tm, &fsec, &tzn, pg_tzset("UTC")); -@@ -364,7 +365,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -364,7 +366,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i case TIMESTAMPTZOID: { Timestamp valueTimestamp = DatumGetTimestamp(value); @@ -713,7 +714,7 @@ index 8c25f5c..6093a5a 100644 int tz; struct pg_tm tt, -@@ -384,7 +385,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -384,7 +386,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i case BITOID: { int32 dat; @@ -722,7 +723,7 @@ index 8c25f5c..6093a5a 100644 char *outputString = NULL; Oid outputFunctionId = InvalidOid; bool typeVarLength = false; -@@ -412,7 +413,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i +@@ -412,7 +414,7 @@ mysql_bind_sql_var(Oid type, int attnum, Datum value, MYSQL_BIND *binds, bool *i len = VARSIZE_4B(result) - VARHDRSZ; dat = VARDATA_4B(result); } @@ -731,7 +732,7 @@ index 8c25f5c..6093a5a 100644 memcpy(bufptr, (char*)dat, len); binds[attnum].buffer = bufptr; binds[attnum].buffer_length = len; -@@ -438,9 +439,9 @@ void +@@ -438,9 +440,9 @@ void mysql_bind_result(Oid pgtyp, int pgtypmod, MYSQL_FIELD *field, mysql_column *column) { MYSQL_BIND *mbind = column->_mysql_bind; @@ -744,7 +745,7 @@ index 8c25f5c..6093a5a 100644 switch (pgtyp) { diff --git option.cpp option.cpp -index 574cb24..5c92c50 100644 +index 574cb24a..5c92c50f 100644 --- option.cpp +++ option.cpp @@ -81,7 +81,7 @@ static struct MySQLFdwOption valid_options[] = From 132163726299af759a040024516304373a544bf4 Mon Sep 17 00:00:00 2001 From: chenlinfeng3 <1377682907@qq.com> Date: Mon, 3 Aug 2020 13:05:27 +0800 Subject: [PATCH 2/3] bugfix: cancel change kernel to support some third-party extensions --- .../cbb/extension/foreign/foreign.cpp | 3 +- .../optimizer/commands/tablecmds.cpp | 7 +- src/gausskernel/process/tcop/utility.cpp | 36 ++++++++++ src/test/regress/expected/backtrace_log.out | 2 +- src/test/regress/expected/gtt_function.out | 2 + src/test/regress/expected/join.out | 68 +++++++++---------- src/test/regress/expected/rangefuncs.out | 2 +- 7 files changed, 82 insertions(+), 38 deletions(-) diff --git a/src/gausskernel/cbb/extension/foreign/foreign.cpp b/src/gausskernel/cbb/extension/foreign/foreign.cpp index 79f16f618..40664fb9d 100644 --- a/src/gausskernel/cbb/extension/foreign/foreign.cpp +++ b/src/gausskernel/cbb/extension/foreign/foreign.cpp @@ -524,7 +524,8 @@ FdwRoutine* GetFdwRoutineByServerId(Oid serverid) /* Get foreign-data wrapper OID for the server. */ tp = SearchSysCache1(FOREIGNSERVEROID, ObjectIdGetDatum(serverid)); if (!HeapTupleIsValid(tp)) - return NULL; + ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), + errmsg("cache lookup failed for foreign server %u", serverid))); serverform = (Form_pg_foreign_server) GETSTRUCT(tp); fdwid = serverform->srvfdw; ReleaseSysCache(tp); diff --git a/src/gausskernel/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index 4591429be..c73429a13 100644 --- a/src/gausskernel/optimizer/commands/tablecmds.cpp +++ b/src/gausskernel/optimizer/commands/tablecmds.cpp @@ -1845,7 +1845,12 @@ Oid DefineRelation(CreateStmt* stmt, char relkind, Oid ownerId) if (colDef->raw_default != NULL) { RawColumnDefault* rawEnt = NULL; - + if (relkind == RELKIND_FOREIGN_TABLE) { + if (!(IsA(stmt, CreateForeignTableStmt) && + isMOTTableFromSrvName(((CreateForeignTableStmt*)stmt)->servername))) + ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), + errmsg("default values on foreign tables are not supported"))); + } Assert(colDef->cooked_default == NULL); rawEnt = (RawColumnDefault*)palloc(sizeof(RawColumnDefault)); rawEnt->attnum = attnum; diff --git a/src/gausskernel/process/tcop/utility.cpp b/src/gausskernel/process/tcop/utility.cpp index ed3bbd01a..bccffbfcd 100755 --- a/src/gausskernel/process/tcop/utility.cpp +++ b/src/gausskernel/process/tcop/utility.cpp @@ -3586,6 +3586,9 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi } break; case T_AlterDomainStmt: +#ifdef PGXC + ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("domain is not yet supported."))); +#endif /* PGXC */ { AlterDomainStmt* stmt = (AlterDomainStmt*)parse_tree; @@ -4237,6 +4240,10 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi } break; case T_RuleStmt: /* CREATE RULE */ +#ifdef PGXC + if (!IsInitdb && !u_sess->attr.attr_sql.enable_cluster_resize && !u_sess->exec_cxt.extension_is_valid) + ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("RULE is not yet supported."))); +#endif /* PGXC */ DefineRule((RuleStmt*)parse_tree, query_string); #ifdef PGXC if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) { @@ -4920,6 +4927,10 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi * ******************************** DOMAIN statements **** */ case T_CreateDomainStmt: +#ifdef PGXC + if (!IsInitdb && !u_sess->attr.attr_common.IsInplaceUpgrade) + ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("domain is not yet supported."))); +#endif /* PGXC */ DefineDomain((CreateDomainStmt*)parse_tree); #ifdef PGXC if (IS_PGXC_COORDINATOR) @@ -8520,6 +8531,9 @@ void CheckObjectInBlackList(ObjectType obj_type, const char* query_string) return; else break; + case OBJECT_AGGREGATE: + tag = "AGGREGATE"; + break; case OBJECT_OPERATOR: tag = "OPERATOR"; break; @@ -8582,6 +8596,28 @@ void CheckObjectInBlackList(ObjectType obj_type, const char* query_string) */ bool CheckExtensionInWhiteList(const char* extension_name, uint32 hash_value, bool hash_check) { + /* 2902411162 hash for fastcheck, the sql file is much shorter than published version. */ + uint32 postgisHashHistory[POSTGIS_VERSION_NUM] = {2902411162, 2959454932}; + + /* check for extension name */ + if (pg_strcasecmp(extension_name, "postgis") == 0) { + /* PostGIS is disabled under 300 deployment */ + if (is_feature_disabled(POSTGIS_DOCKING)) { + return false; + } + + if (hash_check && !isSecurityMode) { + /* check for postgis hashvalue */ + for (int i = 0; i < POSTGIS_VERSION_NUM; i++) { + if (hash_value == postgisHashHistory[i]) { + return true; + } + } + } else { + return true; + } + } + return true; } diff --git a/src/test/regress/expected/backtrace_log.out b/src/test/regress/expected/backtrace_log.out index e05b9fbe7..42432838f 100644 --- a/src/test/regress/expected/backtrace_log.out +++ b/src/test/regress/expected/backtrace_log.out @@ -8,7 +8,7 @@ select count(*) from pg_node_env; select count(*) from pg_os_threads; count ------- - 29 + 10 (1 row) -- test backtrace output to log diff --git a/src/test/regress/expected/gtt_function.out b/src/test/regress/expected/gtt_function.out index 255882cf5..42ae37296 100644 --- a/src/test/regress/expected/gtt_function.out +++ b/src/test/regress/expected/gtt_function.out @@ -46,6 +46,8 @@ select * from gtt6; -- ERROR create index CONCURRENTLY idx_gtt1 on gtt1 (b); +ERROR: PGXC does not support concurrent INDEX yet +DETAIL: The feature is not currently supported -- ERROR cluster gtt1 using gtt1_pkey; -- ERROR diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out index e33f8436d..77a81e872 100644 --- a/src/test/regress/expected/join.out +++ b/src/test/regress/expected/join.out @@ -3230,15 +3230,15 @@ INSERT INTO c VALUES (0), (1); INSERT INTO d VALUES (1,3), (2,2), (3,1); -- all three cases should be optimizable into a simple seqscan explain (verbose on, costs off, nodes off) SELECT a.* FROM a LEFT JOIN b ON a.b_id = b.id; - QUERY PLAN ----------------------------------------- +--?.*QUERY PLAN.* +--?----------------------------.* --? Seq Scan on pg_temp_datanod.* Output: a.id, a.b_id (2 rows) explain (verbose on, costs off, nodes off) SELECT b.* FROM b LEFT JOIN c ON b.c_id = c.id; - QUERY PLAN ----------------------------------------- +--?.*QUERY PLAN.* +--?----------------------------.* --? Seq Scan on pg_temp_datanod.* Output: b.id, b.c_id (2 rows) @@ -3246,8 +3246,8 @@ explain (verbose on, costs off, nodes off) SELECT b.* FROM b LEFT JOIN c ON b.c_ explain (verbose on, costs off, nodes off) SELECT a.* FROM a LEFT JOIN (b left join c on b.c_id = c.id) ON (a.b_id = b.id); - QUERY PLAN ----------------------------------------- +--?QUERY PLAN.* +--?-----------------------------.* --? Seq Scan on pg_temp_datanod.* Output: a.id, a.b_id (2 rows) @@ -3257,8 +3257,8 @@ explain (verbose on, costs off, nodes off) select id from a where id in ( select b.id from b left join c on b.id = c.id ); - QUERY PLAN ----------------------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* Hash Join Output: a.id Hash Cond: (a.id = b.id) @@ -3275,8 +3275,8 @@ select id from a where id in ( explain (verbose on, costs off, nodes off) select d.* from d left join (select * from b group by b.id, b.c_id) s on d.a = s.id and d.b = s.c_id; - QUERY PLAN ----------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* --? Seq Scan on pg_temp_datanod.* Output: d.a, d.b (2 rows) @@ -3285,8 +3285,8 @@ select d.* from d left join (select * from b group by b.id, b.c_id) s explain (verbose on, costs off, nodes off) select d.* from d left join (select distinct * from b) s on d.a = s.id and d.b = s.c_id; - QUERY PLAN ----------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* --? Seq Scan on pg_temp_datanod.* Output: d.a, d.b (2 rows) @@ -3296,8 +3296,8 @@ select d.* from d left join (select distinct * from b) s explain (verbose on, costs off, nodes off) select d.* from d left join (select * from b group by b.id, b.c_id) s on d.a = s.id; - QUERY PLAN ----------------------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* Hash Right Join Output: d.a, d.b Hash Cond: (b.id = d.a) @@ -3316,8 +3316,8 @@ select d.* from d left join (select * from b group by b.id, b.c_id) s explain (verbose on, costs off, nodes off) select d.* from d left join (select distinct * from b) s on d.a = s.id; - QUERY PLAN ----------------------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* Hash Right Join Output: d.a, d.b Hash Cond: (b.id = d.a) @@ -3337,8 +3337,8 @@ select d.* from d left join (select distinct * from b) s explain (verbose on, costs off, nodes off) select d.* from d left join (select id from a union select id from b) s on d.a = s.id; - QUERY PLAN ----------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* --? Seq Scan on pg_temp_datanod.* Output: d.a, d.b (2 rows) @@ -3347,8 +3347,8 @@ select d.* from d left join (select id from a union select id from b) s explain (verbose on, costs off, nodes off) select i8.* from int8_tbl i8 left join (select f1 from int4_tbl group by f1) i4 on i8.q1 = i4.f1; - QUERY PLAN --------------------------------- +--?QUERY PLAN.* +--?----------------------------.* Seq Scan on public.int8_tbl i8 Output: i8.q1, i8.q2 (2 rows) @@ -3371,8 +3371,8 @@ select p.* from parent p left join child c on (p.k = c.k) order by 1,2; explain (verbose on, costs off, nodes off) select p.* from parent p left join child c on (p.k = c.k) order by 1,2; - QUERY PLAN ------------------------------------------------------ +--?QUERY PLAN.* +--?----------------------------.* Sort Output: p.k, p.pd Sort Key: p.k, p.pd @@ -3395,8 +3395,8 @@ explain (verbose on, costs off, nodes off) select p.*, linked from parent p left join (select c.*, true as linked from child c) as ss on (p.k = ss.k) order by p.k; - QUERY PLAN ------------------------------------------------------------------------------ +--?QUERY PLAN.* +--?----------------------------.* Merge Left Join Output: p.k, p.pd, (true) Merge Cond: (p.k = c.k) @@ -3418,8 +3418,8 @@ explain (verbose on, costs off, nodes off) select p.* from parent p left join child c on (p.k = c.k) where p.k = 1 and p.k = 2; - QUERY PLAN --------------------------- +--?QUERY PLAN.* +--?----------------.* Result Output: p.k, p.pd One-Time Filter: false @@ -3519,8 +3519,8 @@ select t1.* from on (t1.f1 = b1.d1) left join int4_tbl i4 on (i8.q2 = i4.f1); - QUERY PLAN ----------------------------------------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* Hash Left Join Output: t1.f1 Hash Cond: (i8.q2 = i4.f1) @@ -3586,8 +3586,8 @@ select t1.* from on (t1.f1 = b1.d1) left join int4_tbl i4 on (i8.q2 = i4.f1); - QUERY PLAN ----------------------------------------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* Hash Left Join Output: t1.f1 Hash Cond: (i8.q2 = i4.f1) @@ -3652,8 +3652,8 @@ select * from on t1.f1 = 'doh!' left join int4_tbl i4 on i8.q1 = i4.f1; - QUERY PLAN --------------------------------------------------------------- +--?QUERY PLAN.* +--?----------------------------.* Nested Loop Left Join Output: t1.f1, i8.q1, i8.q2, t2.f1, i4.f1 -> Seq Scan on public.text_tbl t2 @@ -3700,8 +3700,8 @@ CREATE TABLE mj_t2 (a int,c char(10)); insert into mj_t2 values(12,'abcde'); insert into mj_t2 values(12,'efghi'); explain (nodes off, costs off) select * from mj_t1 full outer join mj_t2 on 1=1; - QUERY PLAN -------------------------------- +--?QUERY PLAN.* +--?-----------------------.* Merge Full Join -> Seq Scan on mj_t1 -> Materialize diff --git a/src/test/regress/expected/rangefuncs.out b/src/test/regress/expected/rangefuncs.out index 253635246..0a3745376 100644 --- a/src/test/regress/expected/rangefuncs.out +++ b/src/test/regress/expected/rangefuncs.out @@ -71,7 +71,7 @@ SELECT name, setting FROM pg_settings WHERE name LIKE 'enable%' ORDER BY name; enable_sonic_optspill | on enable_sort | on enable_stream_replication | on - enable_thread_pool | on + enable_thread_pool | off enable_tidscan | on enable_upgrade_merge_lock_mode | off enable_user_metric_persistent | on From 05c7ae30fb9ca76f079c486a9964f32db824e55d Mon Sep 17 00:00:00 2001 From: xiongxiaojun Date: Tue, 4 Aug 2020 09:47:33 +0800 Subject: [PATCH 3/3] support concurrent index and range type in openGauss --- .../optimizer/commands/indexcmds.cpp | 7 + .../optimizer/commands/tablecmds.cpp | 7 + src/gausskernel/process/tcop/utility.cpp | 8 +- src/test/regress/expected/create_index.out | 43 +-- src/test/regress/expected/gtt_function.out | 4 +- .../expected/single_node_opr_sanity.out | 2 +- .../expected/single_node_rangetypes.out | 324 +++++++++--------- src/test/regress/expected/sqlLLT.out | 1 - .../regress/output/hw_cstore_index.source | 2 +- src/test/regress/sql/gtt_function.sql | 2 +- 10 files changed, 204 insertions(+), 196 deletions(-) diff --git a/src/gausskernel/optimizer/commands/indexcmds.cpp b/src/gausskernel/optimizer/commands/indexcmds.cpp index 7ef2a7118..e1a1413e2 100755 --- a/src/gausskernel/optimizer/commands/indexcmds.cpp +++ b/src/gausskernel/optimizer/commands/indexcmds.cpp @@ -1007,6 +1007,13 @@ Oid DefineIndex(Oid relationId, IndexStmt* stmt, Oid indexRelationId, bool is_al return indexRelationId; } + // cstore relation doesn't support concurrent INDEX now. + if (OidIsValid(rel->rd_rel->relcudescrelid)) { + ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("column store table does not support concurrent INDEX yet"), + errdetail("The feature is not currently supported"))); + } + /* save lockrelid and locktag for below, then close rel */ heaprelid = rel->rd_lockInfo.lockRelId; SET_LOCKTAG_RELATION(heaplocktag, heaprelid.dbId, heaprelid.relId); diff --git a/src/gausskernel/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index c73429a13..30582e4a9 100644 --- a/src/gausskernel/optimizer/commands/tablecmds.cpp +++ b/src/gausskernel/optimizer/commands/tablecmds.cpp @@ -2505,6 +2505,13 @@ void RemoveRelations(DropStmt* drop, StringInfo tmp_queryString, RemoteQueryExec errmsg("%s is redistributing, please retry later.", delrel->rd_rel->relname.data))); } + // cstore relation doesn't support concurrent INDEX now. + if (drop->concurrent == true && delrel != NULL && OidIsValid(delrel->rd_rel->relcudescrelid)) { + ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("column store table does not support concurrent INDEX yet"), + errdetail("The feature is not currently supported"))); + } + if (delrel != NULL) { relation_close(delrel, NoLock); } diff --git a/src/gausskernel/process/tcop/utility.cpp b/src/gausskernel/process/tcop/utility.cpp index bccffbfcd..0f7057ceb 100755 --- a/src/gausskernel/process/tcop/utility.cpp +++ b/src/gausskernel/process/tcop/utility.cpp @@ -2779,7 +2779,7 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi switch (((DropStmt*)parse_tree)->removeType) { case OBJECT_INDEX: -#ifdef PGXC +#ifdef ENABLE_MULTIPLE_NODES if (((DropStmt*)parse_tree)->concurrent) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), @@ -3928,10 +3928,10 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi } break; case T_CreateRangeStmt: /* CREATE TYPE AS RANGE */ -#ifdef PGXC +#ifdef ENABLE_MULTIPLE_NODES ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("user defined range type is not yet supported."))); -#endif /* PGXC */ +#endif /* ENABLE_MULTIPLE_NODES */ DefineRange((CreateRangeStmt*)parse_tree); #ifdef PGXC if (IS_PGXC_COORDINATOR) @@ -4140,12 +4140,14 @@ void standard_ProcessUtility(Node* parse_tree, const char* query_string, ParamLi is_first_node = (strcmp(first_exec_node, g_instance.attr.attr_common.PGXCNodeName) == 0); } +#ifdef ENABLE_MULTIPLE_NODES if (stmt->concurrent) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("PGXC does not support concurrent INDEX yet"), errdetail("The feature is not currently supported"))); } +#endif /* INDEX on a temporary table cannot use 2PC at commit */ rel_id = RangeVarGetRelidExtended(stmt->relation, AccessShareLock, true, false, false, true, NULL, NULL); diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out index e12b4afa4..d9eb20283 100644 --- a/src/test/regress/expected/create_index.out +++ b/src/test/regress/expected/create_index.out @@ -2203,31 +2203,23 @@ create unique index hash_f8_index_3 on hash_f8_heap(random) where seqno > 1000; CREATE TABLE concur_heap (f1 text, f2 text); -- empty table CREATE INDEX CONCURRENTLY concur_index1 ON concur_heap(f2,f1); -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported INSERT INTO concur_heap VALUES ('a','b'); INSERT INTO concur_heap VALUES ('b','b'); -- unique index CREATE UNIQUE INDEX CONCURRENTLY concur_index2 ON concur_heap(f1); -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported -- check if constraint is set up properly to be enforced INSERT INTO concur_heap VALUES ('b','x'); +ERROR: duplicate key value violates unique constraint "concur_index2" +DETAIL: Key (f1)=(b) already exists. -- check if constraint is enforced properly at build time CREATE UNIQUE INDEX CONCURRENTLY concur_index3 ON concur_heap(f2); -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported +ERROR: could not create unique index "concur_index3" +DETAIL: Key (f2)=(b) is duplicated. -- test that expression indexes and partial indexes work concurrently CREATE INDEX CONCURRENTLY concur_index4 on concur_heap(f2) WHERE f1='a'; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported CREATE INDEX CONCURRENTLY concur_index5 on concur_heap(f2) WHERE f1='x'; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported -- here we also check that you can default the index name CREATE INDEX CONCURRENTLY on concur_heap((f2||f1)); -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported -- You can't do a concurrent index build in a transaction START TRANSACTION; CREATE INDEX CONCURRENTLY concur_index7 ON concur_heap(f1); @@ -2247,42 +2239,33 @@ Table "public.concur_heap" f1 | text | f2 | text | Indexes: + "concur_index2" UNIQUE, btree (f1) TABLESPACE pg_default + "concur_index3" UNIQUE, btree (f2) TABLESPACE pg_default INVALID + "concur_heap_expr_idx" btree ((f2 || f1)) TABLESPACE pg_default + "concur_index1" btree (f2, f1) TABLESPACE pg_default + "concur_index4" btree (f2) TABLESPACE pg_default WHERE f1 = 'a'::text + "concur_index5" btree (f2) TABLESPACE pg_default WHERE f1 = 'x'::text "std_index" btree (f2) TABLESPACE pg_default -- -- Try some concurrent index drops -- DROP INDEX CONCURRENTLY "concur_index2"; -- works -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported DROP INDEX CONCURRENTLY IF EXISTS "concur_index2"; -- notice -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported +NOTICE: index "concur_index2" does not exist, skipping -- failures DROP INDEX CONCURRENTLY "concur_index2", "concur_index3"; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported +ERROR: DROP INDEX CONCURRENTLY does not support dropping multiple objects START TRANSACTION; DROP INDEX CONCURRENTLY "concur_index5"; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported +ERROR: DROP INDEX CONCURRENTLY cannot run inside a transaction block ROLLBACK; -- successes DROP INDEX CONCURRENTLY IF EXISTS "concur_index3"; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported DROP INDEX CONCURRENTLY "concur_index4"; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported DROP INDEX CONCURRENTLY "concur_index5"; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported DROP INDEX CONCURRENTLY "concur_index1"; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported DROP INDEX CONCURRENTLY "concur_heap_expr_idx"; -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported \d concur_heap Table "public.concur_heap" Column | Type | Modifiers diff --git a/src/test/regress/expected/gtt_function.out b/src/test/regress/expected/gtt_function.out index 42ae37296..354b600c9 100644 --- a/src/test/regress/expected/gtt_function.out +++ b/src/test/regress/expected/gtt_function.out @@ -44,10 +44,8 @@ select * from gtt6; --- (0 rows) --- ERROR +-- SUCCESS create index CONCURRENTLY idx_gtt1 on gtt1 (b); -ERROR: PGXC does not support concurrent INDEX yet -DETAIL: The feature is not currently supported -- ERROR cluster gtt1 using gtt1_pkey; -- ERROR diff --git a/src/test/regress/expected/single_node_opr_sanity.out b/src/test/regress/expected/single_node_opr_sanity.out index bab75f93b..01d19f172 100755 --- a/src/test/regress/expected/single_node_opr_sanity.out +++ b/src/test/regress/expected/single_node_opr_sanity.out @@ -2693,7 +2693,7 @@ select count(*) from pg_proc where prokind = 'w'; select count(*) from pg_proc where prokind = 'f'; count ------- - 3134 + 3142 (1 row) select count(*) from pg_proc where prokind = 'p'; diff --git a/src/test/regress/expected/single_node_rangetypes.out b/src/test/regress/expected/single_node_rangetypes.out index 01c338fca..92662641a 100644 --- a/src/test/regress/expected/single_node_rangetypes.out +++ b/src/test/regress/expected/single_node_rangetypes.out @@ -1,167 +1,195 @@ -- Tests for range data types. create type textrange as range (subtype=text, collation="C"); -ERROR: user defined range type is not yet supported. -- -- test input parser -- -- negative tests; should fail select ''::textrange; -ERROR: type "textrange" does not exist -LINE 1: select ''::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + +(1 row) + select '-[a,z)'::textrange; -ERROR: type "textrange" does not exist +ERROR: malformed range literal: "-[a,z)" LINE 1: select '-[a,z)'::textrange; - ^ + ^ +DETAIL: Missing left parenthesis or bracket. CONTEXT: referenced column: textrange select '[a,z) - '::textrange; -ERROR: type "textrange" does not exist +ERROR: malformed range literal: "[a,z) - " LINE 1: select '[a,z) - '::textrange; - ^ + ^ +DETAIL: Junk after right parenthesis or bracket. CONTEXT: referenced column: textrange select '(",a)'::textrange; -ERROR: type "textrange" does not exist +ERROR: malformed range literal: "(",a)" LINE 1: select '(",a)'::textrange; - ^ + ^ +DETAIL: Unexpected end of input. CONTEXT: referenced column: textrange select '(,,a)'::textrange; -ERROR: type "textrange" does not exist +ERROR: malformed range literal: "(,,a)" LINE 1: select '(,,a)'::textrange; - ^ + ^ +DETAIL: Too many commas. CONTEXT: referenced column: textrange select '(),a)'::textrange; -ERROR: type "textrange" does not exist +ERROR: malformed range literal: "(),a)" LINE 1: select '(),a)'::textrange; - ^ + ^ +DETAIL: Missing comma after lower bound. CONTEXT: referenced column: textrange select '(a,))'::textrange; -ERROR: type "textrange" does not exist +ERROR: malformed range literal: "(a,))" LINE 1: select '(a,))'::textrange; - ^ + ^ +DETAIL: Junk after right parenthesis or bracket. CONTEXT: referenced column: textrange select '(],a)'::textrange; -ERROR: type "textrange" does not exist +ERROR: malformed range literal: "(],a)" LINE 1: select '(],a)'::textrange; - ^ + ^ +DETAIL: Missing comma after lower bound. CONTEXT: referenced column: textrange select '(a,])'::textrange; -ERROR: type "textrange" does not exist +ERROR: malformed range literal: "(a,])" LINE 1: select '(a,])'::textrange; - ^ + ^ +DETAIL: Junk after right parenthesis or bracket. CONTEXT: referenced column: textrange select '[z,a]'::textrange; -ERROR: type "textrange" does not exist +ERROR: range lower bound must be less than or equal to range upper bound LINE 1: select '[z,a]'::textrange; - ^ + ^ CONTEXT: referenced column: textrange -- should succeed select ' empty '::textrange; -ERROR: type "textrange" does not exist -LINE 1: select ' empty '::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + empty +(1 row) + select ' ( empty, empty ) '::textrange; -ERROR: type "textrange" does not exist -LINE 1: select ' ( empty, empty ) '::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +---------------------- + (" empty"," empty ") +(1 row) + select ' ( " a " " a ", " z " " z " ) '::textrange; -ERROR: type "textrange" does not exist -LINE 1: select ' ( " a " " a ", " z " " z " ) '::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +-------------------------- + (" a a "," z z ") +(1 row) + select '(,z)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '(,z)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + (,z) +(1 row) + select '(a,)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '(a,)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + (a,) +(1 row) + select '[,z]'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '[,z]'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + (,z] +(1 row) + select '[a,]'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '[a,]'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + [a,) +(1 row) + select '(,)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '(,)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + (,) +(1 row) + select '[ , ]'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '[ , ]'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + [" "," "] +(1 row) + select '["",""]'::textrange; -ERROR: type "textrange" does not exist +ERROR: rangetypes.cpp : 2140 : The parameter destMax is equal to zero or larger than the macro : SECUREC_STRING_MAX_LEN. LINE 1: select '["",""]'::textrange; - ^ + ^ CONTEXT: referenced column: textrange select '[",",","]'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '[",",","]'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + [",",","] +(1 row) + select '["\\","\\"]'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '["\\","\\"]'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +------------- + ["\\","\\"] +(1 row) + select '(\\,a)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '(\\,a)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + ("\\",a) +(1 row) + select '((,z)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '((,z)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + ("(",z) +(1 row) + select '([,z)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '([,z)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + ("[",z) +(1 row) + select '(!,()'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '(!,()'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + (!,"(") +(1 row) + select '(!,[)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '(!,[)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + (!,"[") +(1 row) + select '[a,a]'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '[a,a]'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + [a,a] +(1 row) + -- these are allowed but normalize to empty: select '[a,a)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '[a,a)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + empty +(1 row) + select '(a,a]'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '(a,a]'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + empty +(1 row) + select '(a,a)'::textrange; -ERROR: type "textrange" does not exist -LINE 1: select '(a,a)'::textrange; - ^ -CONTEXT: referenced column: textrange + textrange +----------- + empty +(1 row) + -- -- create some test data and test the operators -- @@ -871,35 +899,31 @@ set timezone to default; -- --should fail create type float8range as range (subtype=float8, subtype_diff=float4mi); -ERROR: user defined range type is not yet supported. +ERROR: function float4mi(double precision, double precision) does not exist --should succeed create type float8range as range (subtype=float8, subtype_diff=float8mi); -ERROR: user defined range type is not yet supported. select '[123.001, 5.e9)'::float8range @> 888.882::float8; -ERROR: type "float8range" does not exist -LINE 1: select '[123.001, 5.e9)'::float8range @> 888.882::float8; - ^ + ?column? +---------- + t +(1 row) + create table float8range_test(f8r float8range, i int); -ERROR: type "float8range" does not exist -LINE 1: create table float8range_test(f8r float8range, i int); - ^ insert into float8range_test values(float8range(-100.00007, '1.111113e9'), 42); -ERROR: relation "float8range_test" does not exist on datanode1 -LINE 1: insert into float8range_test values(float8range(-100.00007, ... - ^ select * from float8range_test; -ERROR: relation "float8range_test" does not exist on datanode1 -LINE 1: select * from float8range_test; - ^ + f8r | i +-------------------------+---- + [-100.00007,1111113000) | 42 +(1 row) + drop table float8range_test; -ERROR: table "float8range_test" does not exist -- -- Test range types over domains -- create domain mydomain as int4; ERROR: domain is not yet supported. create type mydomainrange as range(subtype=mydomain); -ERROR: user defined range type is not yet supported. +ERROR: type "mydomain" does not exist select '[4,50)'::mydomainrange @> 7::mydomain; ERROR: type "mydomainrange" does not exist LINE 1: select '[4,50)'::mydomainrange @> 7::mydomain; @@ -927,23 +951,17 @@ ERROR: type "restrictedrange" does not exist -- Test multiple range types over the same subtype -- create type textrange1 as range(subtype=text, collation="C"); -ERROR: user defined range type is not yet supported. create type textrange2 as range(subtype=text, collation="C"); -ERROR: user defined range type is not yet supported. select textrange1('a','Z') @> 'b'::text; -ERROR: function textrange1(unknown, unknown) does not exist -LINE 1: select textrange1('a','Z') @> 'b'::text; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. +ERROR: range lower bound must be less than or equal to range upper bound select textrange2('a','z') @> 'b'::text; -ERROR: function textrange2(unknown, unknown) does not exist -LINE 1: select textrange2('a','z') @> 'b'::text; - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. + ?column? +---------- + t +(1 row) + drop type textrange1; -ERROR: type "textrange1" does not exist drop type textrange2; -ERROR: type "textrange2" does not exist -- -- Test polymorphic type system -- @@ -1024,40 +1042,34 @@ drop table i8r_array; -- Ranges of arrays -- create type arrayrange as range (subtype=int4[]); -ERROR: user defined range type is not yet supported. select arrayrange(ARRAY[1,2], ARRAY[2,1]); -ERROR: function arrayrange(integer[], integer[]) does not exist -LINE 1: select arrayrange(ARRAY[1,2], ARRAY[2,1]); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. -CONTEXT: referenced column: arrayrange + arrayrange +------------------- + ["{1,2}","{2,1}") +(1 row) + select arrayrange(ARRAY[2,1], ARRAY[1,2]); -- fail -ERROR: function arrayrange(integer[], integer[]) does not exist -LINE 1: select arrayrange(ARRAY[2,1], ARRAY[1,2]); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. +ERROR: range lower bound must be less than or equal to range upper bound CONTEXT: referenced column: arrayrange select array[1,1] <@ arrayrange(array[1,2], array[2,1]); -ERROR: function arrayrange(integer[], integer[]) does not exist -LINE 1: select array[1,1] <@ arrayrange(array[1,2], array[2,1]); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. + ?column? +---------- + f +(1 row) + select array[1,3] <@ arrayrange(array[1,2], array[2,1]); -ERROR: function arrayrange(integer[], integer[]) does not exist -LINE 1: select array[1,3] <@ arrayrange(array[1,2], array[2,1]); - ^ -HINT: No function matches the given name and argument types. You might need to add explicit type casts. + ?column? +---------- + t +(1 row) + -- -- Check behavior when subtype lacks a hash function -- create type cashrange as range (subtype = money); -ERROR: user defined range type is not yet supported. set enable_sort = off; -- try to make it pick a hash setop implementation select '(2,5)'::cashrange except select '(5,6)'::cashrange; -ERROR: type "cashrange" does not exist -LINE 1: select '(2,5)'::cashrange except select '(5,6)'::cashrange; - ^ -CONTEXT: referenced column: cashrange +ERROR: could not identify a hash function for type money reset enable_sort; -- -- OUT/INOUT/TABLE functions diff --git a/src/test/regress/expected/sqlLLT.out b/src/test/regress/expected/sqlLLT.out index 13d84c81b..a55e5a970 100644 --- a/src/test/regress/expected/sqlLLT.out +++ b/src/test/regress/expected/sqlLLT.out @@ -3324,7 +3324,6 @@ ERROR: SECURITY LABEL is not yet supported. CREATE TYPE bigobj (INPUT = lo_filein, OUTPUT = lo_fileout, INTERNALLENGTH = VARIABLE); ERROR: function lo_filein(cstring) does not exist CREATE TYPE float8_range AS RANGE (subtype = float8, subtype_diff = float8mi); -ERROR: user defined range type is not yet supported. ALTER TYPE colors ADD VALUE 'orange' AFTER 'red'; ERROR: type "colors" does not exist CREATE COLLATION french (LOCALE = 'fr_FR.utf8'); diff --git a/src/test/regress/output/hw_cstore_index.source b/src/test/regress/output/hw_cstore_index.source index 0fa4cba8c..3e0407721 100644 --- a/src/test/regress/output/hw_cstore_index.source +++ b/src/test/regress/output/hw_cstore_index.source @@ -10,7 +10,7 @@ COPY cstore_insert_t1 FROM '@abs_srcdir@/tmp_check/datanode1/pg_copydir/cstore_c CREATE UNIQUE INDEX unsupport1_idx ON cstore_insert_t1(c1); ERROR: access method "psort" does not support unique indexes CREATE INDEX CONCURRENTLY unsupport2_idx ON cstore_insert_t1(c1); -ERROR: PGXC does not support concurrent INDEX yet +ERROR: column store table does not support concurrent INDEX yet DETAIL: The feature is not currently supported CREATE INDEX unsupport3_idx ON cstore_insert_t1(lower(c2)); ERROR: access method "psort" does not support index expressions diff --git a/src/test/regress/sql/gtt_function.sql b/src/test/regress/sql/gtt_function.sql index c07658a21..19bd495cb 100644 --- a/src/test/regress/sql/gtt_function.sql +++ b/src/test/regress/sql/gtt_function.sql @@ -43,7 +43,7 @@ commit; -- 0 row select * from gtt6; --- ERROR +-- SUCCESS create index CONCURRENTLY idx_gtt1 on gtt1 (b); -- ERROR