diff --git a/GNUmakefile.in b/GNUmakefile.in index 172766350..2e95bfab4 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -102,6 +102,7 @@ install: @if test -d contrib/gms_stats; then $(MAKE) -C contrib/gms_stats $@; fi @if test -d contrib/gms_profiler; then $(MAKE) -C contrib/gms_profiler $@; fi @if test -d contrib/gms_output; then $(MAKE) -C contrib/gms_output $@; fi + @if test -d contrib/timescaledb; then export CC=${GCC_PATH}/gcc/bin/gcc; export CXX=${GCC_PATH}/gcc/bin/g++; (cd contrib/timescaledb && ./run_to_build.sh && cd build && $(MAKE) $@); fi +@echo "openGauss installation complete." endif endif diff --git a/build/script/aarch64_opengauss_list b/build/script/aarch64_opengauss_list index 9f8687396..dc5d52fa5 100644 --- a/build/script/aarch64_opengauss_list +++ b/build/script/aarch64_opengauss_list @@ -75,6 +75,8 @@ ./share/postgresql/extension/ndpplugin--1.0.sql ./share/postgresql/extension/spqplugin.control ./share/postgresql/extension/spqplugin--1.0.sql +./share/postgresql/extension/timescaledb.control +./share/postgresql/extension/timescaledb--1.7.4.sql ./share/postgresql/extension/dolphin.control ./share/postgresql/extension/dolphin--4.0.sql ./share/postgresql/extension/dolphin--1.0--1.1.sql @@ -803,6 +805,9 @@ ./lib/postgresql/pg_plugin ./lib/postgresql/proc_srclib ./lib/postgresql/security_plugin.so +./lib/postgresql/timescaledb-1.7.4.so +./lib/postgresql/timescaledb.so +./lib/postgresql/timescaledb-tsl-1.7.4.so ./lib/postgresql/dolphin.so ./lib/postgresql/age.so ./lib/postgresql/datavec.so diff --git a/build/script/opengauss_release_list_ubuntu_single b/build/script/opengauss_release_list_ubuntu_single index 87b353061..617221026 100644 --- a/build/script/opengauss_release_list_ubuntu_single +++ b/build/script/opengauss_release_list_ubuntu_single @@ -61,6 +61,8 @@ ./share/postgresql/extension/hstore.control ./share/postgresql/extension/security_plugin.control ./share/postgresql/extension/security_plugin--1.0.sql +./share/postgresql/extension/timescaledb.control +./share/postgresql/extension/timescaledb--1.7.4.sql ./share/postgresql/extension/dolphin.control ./share/postgresql/extension/dolphin--4.0.sql ./share/postgresql/extension/dolphin--1.0--1.1.sql @@ -776,6 +778,9 @@ ./lib/postgresql/pg_plugin ./lib/postgresql/proc_srclib ./lib/postgresql/security_plugin.so +./lib/postgresql/timescaledb-1.7.4.so +./lib/postgresql/timescaledb.so +./lib/postgresql/timescaledb-tsl-1.7.4.so ./lib/postgresql/dolphin.so ./lib/postgresql/age.so ./lib/postgresql/datavec.so diff --git a/build/script/utils/make_compile.sh b/build/script/utils/make_compile.sh index cf9369727..c4513f54f 100644 --- a/build/script/utils/make_compile.sh +++ b/build/script/utils/make_compile.sh @@ -238,6 +238,11 @@ function install_gaussdb() fi fi +#tsdb prepare + if [ -d "$CODE_BASE/contrib/timescaledb" ]; then + cp $CODE_BASE/contrib/timescaledb/og-timescaledb1.7.4.sql ${GAUSSHOME}/share/postgresql/extension/timescaledb--1.7.4.sql + fi + cd "$ROOT_DIR/contrib/pg_upgrade_support" make clean >> "$LOG_FILE" 2>&1 make -sj >> "$LOG_FILE" 2>&1 diff --git a/build/script/x86_64_opengauss_list b/build/script/x86_64_opengauss_list index fafad621d..a59ef549a 100644 --- a/build/script/x86_64_opengauss_list +++ b/build/script/x86_64_opengauss_list @@ -90,6 +90,8 @@ ./share/postgresql/extension/openGauss_expr_dolphin.ir ./share/postgresql/extension/age--1.0.0.sql ./share/postgresql/extension/age.control +./share/postgresql/extension/timescaledb.control +./share/postgresql/extension/timescaledb--1.7.4.sql ./share/postgresql/extension/datavec--0.4.4.sql ./share/postgresql/extension/datavec.control ./share/postgresql/extension/assessment--1.0.sql @@ -803,6 +805,9 @@ ./lib/postgresql/pg_plugin ./lib/postgresql/proc_srclib ./lib/postgresql/security_plugin.so +./lib/postgresql/timescaledb-1.7.4.so +./lib/postgresql/timescaledb.so +./lib/postgresql/timescaledb-tsl-1.7.4.so ./lib/postgresql/dolphin.so ./lib/postgresql/age.so ./lib/postgresql/datavec.so diff --git a/src/common/backend/utils/misc/postgresql_distribute.conf.sample b/src/common/backend/utils/misc/postgresql_distribute.conf.sample index 7d7d32492..0a0ecfad0 100644 --- a/src/common/backend/utils/misc/postgresql_distribute.conf.sample +++ b/src/common/backend/utils/misc/postgresql_distribute.conf.sample @@ -175,7 +175,7 @@ cstore_buffers = 512MB #min 16MB #max_files_per_process = 1000 # min 25 # (change requires restart) -#shared_preload_libraries = '' # (change requires restart) +#shared_preload_libraries = '' # (change requires restart. if timescaledb is used, add $libdir/timescaledb) # - Cost-Based Vacuum Delay - #vacuum_cost_delay = 0ms # 0-100 milliseconds diff --git a/src/common/backend/utils/misc/postgresql_single.conf.sample b/src/common/backend/utils/misc/postgresql_single.conf.sample index f23618c82..7c28d54ac 100644 --- a/src/common/backend/utils/misc/postgresql_single.conf.sample +++ b/src/common/backend/utils/misc/postgresql_single.conf.sample @@ -171,7 +171,10 @@ cstore_buffers = 512MB #min 16MB #max_files_per_process = 1000 # min 25 # (change requires restart) -#shared_preload_libraries = '' # (change requires restart) + + +#shared_preload_libraries = '' # (change requires restart. if timescaledb is used, add $libdir/timescaledb) + # - Cost-Based Vacuum Delay - #vacuum_cost_delay = 0ms # 0-100 milliseconds diff --git a/src/gausskernel/runtime/vecexecutor/vecexpression.cpp b/src/gausskernel/runtime/vecexecutor/vecexpression.cpp index f069e1824..c803c8f4c 100644 --- a/src/gausskernel/runtime/vecexecutor/vecexpression.cpp +++ b/src/gausskernel/runtime/vecexecutor/vecexpression.cpp @@ -1996,9 +1996,9 @@ void InitVectorFunction(FunctionCallInfo finfo, MemoryContext fcacheCxt) if (u_sess->attr.attr_sql.dolphin && g_instance.plugin_vec_func_cxt.vec_func_plugin[DOLPHIN_VEC] != NULL) { vec_func_hash = g_instance.plugin_vec_func_cxt.vec_func_plugin[DOLPHIN_VEC]; - } else if (u_sess->attr.attr_sql.whale && - g_instance.plugin_vec_func_cxt.vec_func_plugin[WHALE_VEC] != NULL) { - vec_func_hash = g_instance.plugin_vec_func_cxt.vec_func_plugin[WHALE_VEC]; + } else if (u_sess->attr.attr_sql.whale && + g_instance.plugin_vec_func_cxt.vec_func_plugin[WHALE_VEC] != NULL) { + vec_func_hash = g_instance.plugin_vec_func_cxt.vec_func_plugin[WHALE_VEC]; } else #endif vec_func_hash = g_instance.vec_func_hash;