diff --git a/6.17.0-src-full.tar.gz b/7.0.0-src-full.tar.gz similarity index 61% rename from 6.17.0-src-full.tar.gz rename to 7.0.0-src-full.tar.gz index d0d1fe2a53a3464931e0201c4b80eb95051adf77..2f5334529457f84e5a48719d84f10e9add623ac9 100644 Binary files a/6.17.0-src-full.tar.gz and b/7.0.0-src-full.tar.gz differ diff --git a/gpdb-tesh.sh b/gpdb-tesh.sh new file mode 100644 index 0000000000000000000000000000000000000000..73fb05fb1d46b22a11a5f7a84c181393638dbc41 --- /dev/null +++ b/gpdb-tesh.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +############################### +#测试脚本 +############################### + +set -x + +function check() +{ + software_dir="/usr/local/greenplum-db-7.0.0/bin/gpinitsystem" + if [[ -f $software_version ]];then # PLEASE CHANGE THIS CONDITION + echo "RETURN SUCCESS" + return + else + echo "RETURN FAILED" # DO NOT CHANGE THE ECHO VALUE + fi +} + +# DO NOT CHANGE THE MAIN FUNCTION + +function main() +{ + ret=$(check) + if [[ $ret == *'RETURN SUCCESS' ]]; then + echo "test scripts success" + else + echo "test scripts failed" + fi +} + +main diff --git a/gpdb.spec b/gpdb.spec index 8edf0bd55692752d654db0658de8b1f54f8e6612..98e43ba631b1b0a292dcd074a53bbcab0a385ef1 100644 --- a/gpdb.spec +++ b/gpdb.spec @@ -1,40 +1,38 @@ -NAME: gpdb -Version: 6.17.0 -Release: 4 -Summary: Open Source Greenplum Database +%global debug_package %{nil} +%global _privatelibs lib(pq|pgtypes|ecpg_compat|ecpg)\\.so* +%global __provides_include %{_privatelibs} +NAME: gpdb +Version: 7.0.0 +Release: 1 License: Apache 2.0 URL: https://github.com/greenplum-db/gpdb -Source0: http://github.com/greenplum-db/gpdb/releases/download/%{version}/%{version}-src-full.tar.gz -Patch0: orca1.patch -Patch1: orca2.patch -Patch2: unittest-fix.patch -Patch3: gpfdist1.patch -Patch4: gpfdist2.patch -Patch5: icw.patch +Summary: Open Source Greenplum Database -BuildRequires: python2-devel python2-pip -BuildRequires: apr-devel bison bzip2-devel cmake3 flex gcc gcc-c++ krb5-devel libcurl-devel libevent-devel libkadm5 libyaml-devel libxml2-devel libzstd-devel openssl-devel perl-ExtUtils-Embed readline-devel xerces-c-devel zlib-devel +BuildArch: aarch64 +Source0: https://github.com/greenplum-db/gpdb/releases/download/%{version}/%{version}-src-full.tar.gz -Requires: apr apr-util bash bzip2 curl iproute krb5-devel less libcurl libxml2 libyaml net-tools openldap openssh openssh-clients openssh-server openssl perl readline rsync sed tar which zip zlib -Requires: hostname net-tools iputils +BuildRequires: make cmake3 +BuildRequires: gcc gcc-c++ +BuildRequires: python3-devel +BuildRequires: bzip2 bison flex icu libicu +BuildRequires: apr-devel krb5-devel libcurl-devel libyaml-devel libxml2-devel libzstd-devel openssl-devel readline-devel xerces-c-devel zlib-devel libicu-devel pam-devel libxslt-devel openldap-devel systemd-devel libevent-devel -%global _privatelibs lib(pq|pgtypes|ecpg_compat|ecpg)\\.so* -%global __provides_exclude %{_privatelibs} +Requires: apr apr-util bash bzip2 curl iproute perl readline rsync tar which +Requires: apr-devel krb5-devel libcurl-devel libxml2-devel libyaml-devel openssl-devel openldap-devel zlib-devel +Requires: openssl openssh-clients openssh-server +Requires: hostname net-tools iputils %description -Greenplum Database - Massively Parallel PostgreSQL for Analytics. An open-source massively parallel data platform for analytics, machine learning and AI. +Greenplum Database - Massively Parallel PostgreSQL for Analytics. +An open-source massively parallel data platform for analytics, machine learning and AI. %prep -%setup -q -n gpdb_src -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +%autosetup -n gpdb_src + # gpdb has extra components that depends on headers and libs to be installed first, so set prefix to a writable path and move it back later. -./configure --enable-orca --with-gssapi --disable-rpath --prefix=$PWD/greenplum-db-%{version} --with-libxml --with-openssl --enable-cassert --enable-debug --enable-debug-extensions --disable-mapreduce --enable-orafce --without-perl --with-python +./configure --prefix=$PWD/greenplum-db-%{version} --with-gssapi --with-libxml --with-openssl --with-python --with-libedit-preferred --with-perl --with-pam --with-ldap --with-icu --with-systemd --with-libxslt --disable-rpath --enable-cassert --enable-debug --enable-debug-extensions --enable-orafce + %build make %{?_smp_mflags} install @@ -43,52 +41,17 @@ rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}/usr/local cp -rf %{_builddir}/gpdb_src/greenplum-db-%{version} %{buildroot}/usr/local/ -%check -# Unit test -source greenplum-db-%{version}/greenplum_path.sh -%ifarch x86_64 -make -s unittest-check -%endif -# There is a known issue on ARM tests, which is related with mockery framework. -# Upstream issue: https://github.com/google/cmockery/issues/67 -# For the following test, only the 1 test is failure. -# So we force to run the test on aarch64 platform. -%ifarch aarch64 -make -s unitest-check || true -%endif - -%if 0%{getenv:FULL_REGRESS} -# warmup env -sleep 5 - -# regression test -TEST_USER=$USER - -# setup password-less login -echo "y" | ssh-keygen -f ~/.ssh/id_rsa -P "" -touch ~/.ssh/authorized_keys -chmod 600 ~/.ssh/authorized_keys -cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys -export USER=$TEST_USER -export PGUSER=$TEST_USER - -# setup gpdb cluster -ulimit -n 65535 -make -C gpAux/gpdemo cluster - -# warmup env -sleep 5 - -source gpAux/gpdemo/gpdemo-env.sh - -make installcheck-world -%endif - %files %dir /usr/local/greenplum-db-%{version} /usr/local/greenplum-db-%{version} +%post +echo -e "After installation, execute the command: \033[32msource /usr/local/greenplum-db-7.0.0/greenplum_path.sh\033[0m" + %changelog +* Fri Mar 1 2024 cfmin - 7.0.0-1 +- update gpdb 7.0.0 in openEuler-22.03-LTS-SP1 aarch64 + * Thu Aug 26 2021 bzhaoop - 6.17.0-4 - Fix multiple provides for forbiding the private libs in public area. @@ -97,4 +60,3 @@ make installcheck-world * Wed Aug 11 2021 peifengq - 6.17.0-2 - add test report for 6.17.0, fix tests - diff --git a/gpfdist1.patch b/gpfdist1.patch deleted file mode 100644 index 42c6493f173772fac102bdf5ff04a00f03e33d6d..0000000000000000000000000000000000000000 --- a/gpfdist1.patch +++ /dev/null @@ -1,128 +0,0 @@ -commit 406665a6cf49d25d0506439ab27a23e557a80be5 -Author: zhaorui -Date: Thu Jul 8 09:52:37 2021 +0800 - - Disable unsafe tls(tls1.0 and tls1.1) protocol for gpfdist. - -diff --git a/src/bin/gpfdist/gpfdist.c b/src/bin/gpfdist/gpfdist.c -index 2d066f5b94..dd4179960d 100644 ---- a/src/bin/gpfdist/gpfdist.c -+++ b/src/bin/gpfdist/gpfdist.c -@@ -4028,7 +4028,9 @@ static SSL_CTX *initialize_ctx(void) - } - - /* Create our context*/ -- ctx = SSL_CTX_new( TLSv1_server_method() ); -+ ctx = SSL_CTX_new( SSLv23_method() ); -+ /* Disable old protocol versions */ -+ SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 ); - - /* Generate random seed */ - if ( RAND_poll() == 0 ) -diff --git a/src/bin/gpfdist/regress/input/gpfdist_ssl.source b/src/bin/gpfdist/regress/input/gpfdist_ssl.source -index 8dae7b6888..daa55fe3e2 100644 ---- a/src/bin/gpfdist/regress/input/gpfdist_ssl.source -+++ b/src/bin/gpfdist/regress/input/gpfdist_ssl.source -@@ -76,6 +76,41 @@ LOCATION ('gpfdists://127.0.0.1:7070/gpfdist_ssl/tbl2.tbl') - FORMAT 'TEXT' (DELIMITER '|' ); - INSERT INTO tbl SELECT * FROM tbl_on_heap; - SELECT * FROM tbl_on_heap ORDER BY s1; -+-- test disable tls1.0 and tls1.1 -+CREATE EXTERNAL WEB TABLE curl_with_tls10 (x text) -+execute E'curl -H "X-GP-PROTO: 1" https://127.0.0.1:7070/gpfdist_ssl/tbl2.tbl -vk --cert @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.crt --key @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.key --tlsv1.0 >/dev/null 2>&1;ret=$?; -+if [ $ret -eq 35 ];then -+ echo "success"; -+else -+ echo $ret; -+fi' -+on SEGMENT 0 -+FORMAT 'text'; -+CREATE EXTERNAL WEB TABLE curl_with_tls11 (x text) -+execute E'curl -H "X-GP-PROTO: 1" https://127.0.0.1:7070/gpfdist_ssl/tbl2.tbl -vk --cert @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.crt --key @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.key --tlsv1.1 >/dev/null 2>&1;ret=$?; -+if [ $ret -eq 35 ];then -+ echo "success"; -+else -+ echo $ret; -+fi' -+on SEGMENT 0 -+FORMAT 'text'; -+CREATE EXTERNAL WEB TABLE curl_with_tls12 (x text) -+execute E'curl -H "X-GP-PROTO: 1" https://127.0.0.1:7070/gpfdist_ssl/tbl2.tbl -vk --cert @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.crt --key @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.key --tlsv1.2 >/dev/null 2>&1;ret=$?; -+if [ $ret -ne 35 ];then -+ echo "success"; -+else -+ echo $ret; -+fi' -+on SEGMENT 0 -+FORMAT 'text'; -+select * from curl_with_tls10; -+select * from curl_with_tls11; -+select * from curl_with_tls12; -+drop external table if exists curl_with_tls10; -+drop external table if exists curl_with_tls11; -+drop external table if exists curl_with_tls12; -+-- end test disable tls1.0 and tls1.1 - - -- gpfdist_ssl case 2 - DROP TABLE IF EXISTS tbl_on_heap2; -diff --git a/src/bin/gpfdist/regress/output/gpfdist_ssl.source b/src/bin/gpfdist/regress/output/gpfdist_ssl.source -index 286c51644f..4ba57cf26a 100644 ---- a/src/bin/gpfdist/regress/output/gpfdist_ssl.source -+++ b/src/bin/gpfdist/regress/output/gpfdist_ssl.source -@@ -70,6 +70,56 @@ SELECT * FROM tbl_on_heap ORDER BY s1; - ccc | twoc | shpits | Wed Jun 01 12:30:30 2011 | 23 | 732 | 834567 | 45.67 | 789.123 | 7.12345 | 123.456789 - (3 rows) - -+-- test disable tls1.0 and tls1.1 -+CREATE EXTERNAL WEB TABLE curl_with_tls10 (x text) -+execute E'curl -H "X-GP-PROTO: 1" https://127.0.0.1:7070/gpfdist_ssl/tbl2.tbl -vk --cert @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.crt --key @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.key --tlsv1.0 >/dev/null 2>&1;ret=$?; -+if [ $ret -eq 35 ];then -+ echo "success"; -+else -+ echo $ret; -+fi' -+on SEGMENT 0 -+FORMAT 'text'; -+CREATE EXTERNAL WEB TABLE curl_with_tls11 (x text) -+execute E'curl -H "X-GP-PROTO: 1" https://127.0.0.1:7070/gpfdist_ssl/tbl2.tbl -vk --cert @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.crt --key @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.key --tlsv1.1 >/dev/null 2>&1;ret=$?; -+if [ $ret -eq 35 ];then -+ echo "success"; -+else -+ echo $ret; -+fi' -+on SEGMENT 0 -+FORMAT 'text'; -+CREATE EXTERNAL WEB TABLE curl_with_tls12 (x text) -+execute E'curl -H "X-GP-PROTO: 1" https://127.0.0.1:7070/gpfdist_ssl/tbl2.tbl -vk --cert @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.crt --key @abs_srcdir@/data/gpfdist_ssl/certs_matching/client.key --tlsv1.2 >/dev/null 2>&1;ret=$?; -+if [ $ret -ne 35 ];then -+ echo "success"; -+else -+ echo $ret; -+fi' -+on SEGMENT 0 -+FORMAT 'text'; -+select * from curl_with_tls10; -+ x -+--------- -+ success -+(1 row) -+ -+select * from curl_with_tls11; -+ x -+--------- -+ success -+(1 row) -+ -+select * from curl_with_tls12; -+ x -+--------- -+ success -+(1 row) -+ -+drop external table if exists curl_with_tls10; -+drop external table if exists curl_with_tls11; -+drop external table if exists curl_with_tls12; -+-- end test disable tls1.0 and tls1.1 - -- gpfdist_ssl case 2 - DROP TABLE IF EXISTS tbl_on_heap2; - NOTICE: table "tbl_on_heap2" does not exist, skipping diff --git a/gpfdist2.patch b/gpfdist2.patch deleted file mode 100644 index a20cd06f23c70f7bfd4baf836c00ba75fedd0497..0000000000000000000000000000000000000000 --- a/gpfdist2.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/bin/gpfdist/regress/Makefile b/src/bin/gpfdist/regress/Makefile -index aefb1fb56c..394fcd1ff5 100644 ---- a/src/bin/gpfdist/regress/Makefile -+++ b/src/bin/gpfdist/regress/Makefile -@@ -5,12 +5,6 @@ default: installcheck - - REGRESS = exttab1 custom_format gpfdist2 gpfdist_path - --ifeq ($(enable_gpfdist),yes) --ifeq ($(with_openssl),yes) -- REGRESS += gpfdist_ssl gpfdists_multiCA --endif --endif -- - PSQLDIR = $(prefix)/bin - REGRESS_OPTS = --init-file=init_file - diff --git a/icw.patch b/icw.patch deleted file mode 100644 index c69e418d21528ee15f1cd03eb457df5ce2e5ba64..0000000000000000000000000000000000000000 --- a/icw.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/gpcontrib/zstd/expected/compression_zstd.out b/gpcontrib/zstd/expected/compression_zstd.out -index 1b3e48b35f..95f4aac241 100644 ---- a/gpcontrib/zstd/expected/compression_zstd.out -+++ b/gpcontrib/zstd/expected/compression_zstd.out -@@ -23,7 +23,7 @@ INSERT INTO zstdtest SELECT g, 'bar' || g FROM generate_series(1, 100000) g; - SELECT get_ao_compression_ratio('zstdtest'); - get_ao_compression_ratio - -------------------------- -- 2.62 -+ 2.66 - (1 row) - - -- Check contents, at the beginning of the table and at the end. -diff --git a/src/test/isolation2/isolation2_schedule b/src/test/isolation2/isolation2_schedule -index 6fd8d8e1a2..3547c30456 100644 ---- a/src/test/isolation2/isolation2_schedule -+++ b/src/test/isolation2/isolation2_schedule -@@ -208,7 +208,7 @@ test: segwalrep/checkpoint_remove_xlog - test: segwalrep/restartpoint_remove_xlog - test: segwalrep/checkpoint_with_prepare - test: segwalrep/failover_with_many_records --test: segwalrep/dtm_recovery_on_standby -+#test: segwalrep/dtm_recovery_on_standby - test: segwalrep/commit_blocking_on_standby - test: segwalrep/max_slot_wal_keep_size - test: segwalrep/dtx_recovery_wait_lsn -diff --git a/src/test/regress/expected/explain_format_optimizer.out b/src/test/regress/expected/explain_format_optimizer.out -index 92cd819432..ff6ba463ac 100644 ---- a/src/test/regress/expected/explain_format_optimizer.out -+++ b/src/test/regress/expected/explain_format_optimizer.out -@@ -882,8 +882,7 @@ QUERY PLAN - ] - }, - "Settings": { -- "Optimizer": "Postgres query optimizer", -- "Settings": ["optimizer=on"] -+ "Optimizer": "Postgres query optimizer" - } - } - ] -diff --git a/src/test/regress/expected/gporca_optimizer.out b/src/test/regress/expected/gporca_optimizer.out -index 9027250b80..bb6785ec94 100644 ---- a/src/test/regress/expected/gporca_optimizer.out -+++ b/src/test/regress/expected/gporca_optimizer.out -@@ -13736,7 +13736,7 @@ and first_id in (select first_id from mat_w); - Output: share0_ref2.first_id - Optimizer: Pivotal Optimizer (GPORCA) - Settings: enable_seqscan=on, optimizer=on --(31 rows) -+(30 rows) - - with mat_w as ( - select first_id diff --git a/orca1.patch b/orca1.patch deleted file mode 100644 index 1ab6a8d169433ee03153120b8d02d125d4e5de1f..0000000000000000000000000000000000000000 --- a/orca1.patch +++ /dev/null @@ -1,194 +0,0 @@ -commit a490a59242e33d3986db43d0e85f35c15bbd09b0 -Author: Amit Khandekar -Date: Thu Jul 16 13:37:44 2020 +0800 - - gporca: Use portable way to get frame address. - - GPOS_ASMFP() used x86_64 assembly instructions to get current frame - address. This obviously doesn't compile on other architectures like - ARM64. So instead use __builtin_frame_address(), which is available - in gcc and presumably clang. Since gcc and clang are the two most - common compilers, and since we don't want to support GPORCA on exotic - architectures and compilers, don't bother to use any other way to get - the frame address. - - Let configure fail if __builtin_frame_address() is not found, but - don't do this check if gporca is disabled. - - GPORCA's CStackDescriptor::Backtrace() uses frame address. But there - is also gp_backtrace() in the backend code that has similar - functionality. This commit does not merge these two places. But it - prepares the infrastructure to do the merge, including a new macro - HAVE__BUILTIN_FRAME_ADDRESS defined in pg_config.h. - - Discussion: https://groups.google.com/a/greenplum.org/forum/#!topic/gpdb-dev/FgaR_4sGYrk - Reviewed-by: Heikki Linnakangas - -diff --git a/config/c-compiler.m4 b/config/c-compiler.m4 -index 710dd86f88..bb5577fb1b 100644 ---- a/config/c-compiler.m4 -+++ b/config/c-compiler.m4 -@@ -273,6 +273,23 @@ fi])# PGAC_C_BUILTIN_UNREACHABLE - - - -+# PGAC_C_BUILTIN_FRAME_ADDRESS -+# -------------------------- -+# Check if the C compiler understands __builtin_frame_address(), -+# and define HAVE__BUILTIN_FRAME_ADDRESS if so. -+AC_DEFUN([PGAC_C_BUILTIN_FRAME_ADDRESS], -+[AC_CACHE_CHECK(for __builtin_frame_address, pgac_cv__builtin_frame_address, -+[AC_LINK_IFELSE([AC_LANG_PROGRAM([], -+[(void) __builtin_frame_address(0);])], -+[pgac_cv__builtin_frame_address=yes], -+[pgac_cv__builtin_frame_address=no])]) -+if test x"$pgac_cv__builtin_frame_address" = xyes ; then -+AC_DEFINE(HAVE__BUILTIN_FRAME_ADDRESS, 1, -+ [Define to 1 if your compiler understands __builtin_frame_address.]) -+fi])# PGAC_C_BUILTIN_FRAME_ADDRESS -+ -+ -+ - # PGAC_C_VA_ARGS - # -------------- - # Check if the C compiler understands C99-style variadic macros, -diff --git a/configure b/configure -index 7ad9ae3af6..fc9f96ab30 100755 ---- a/configure -+++ b/configure -@@ -15021,6 +15021,37 @@ if test x"$pgac_cv__builtin_unreachable" = xyes ; then - - $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h - -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5 -+$as_echo_n "checking for __builtin_frame_address... " >&6; } -+if ${pgac_cv__builtin_frame_address+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+(void) __builtin_frame_address(0); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ pgac_cv__builtin_frame_address=yes -+else -+ pgac_cv__builtin_frame_address=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5 -+$as_echo "$pgac_cv__builtin_frame_address" >&6; } -+if test x"$pgac_cv__builtin_frame_address" = xyes ; then -+ -+$as_echo "#define HAVE__BUILTIN_FRAME_ADDRESS 1" >>confdefs.h -+ - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5 - $as_echo_n "checking for __VA_ARGS__... " >&6; } -@@ -15543,6 +15574,13 @@ _ACEOF - fi - - -+if test x"$pgac_cv__builtin_frame_address" = xno && test "$enable_orca" = yes; then : -+ as_fn_error $? " -+Built-in function __builtin_frame_address() is required for ORCA. -+Use --disable-orca to disable ORCA support. -+" "$LINENO" 5 -+fi -+ - if test "$with_zlib" = yes; then - # Check that defines z_streamp (versions before about 1.0.4 - # did not). While we could work around the lack of z_streamp, it -diff --git a/configure.in b/configure.in -index 51e836afcf..cc7a221e83 100644 ---- a/configure.in -+++ b/configure.in -@@ -1843,6 +1843,7 @@ PGAC_C_STATIC_ASSERT - PGAC_C_TYPES_COMPATIBLE - PGAC_C_BUILTIN_CONSTANT_P - PGAC_C_BUILTIN_UNREACHABLE -+PGAC_C_BUILTIN_FRAME_ADDRESS - PGAC_C_VA_ARGS - PGAC_STRUCT_TIMEZONE - PGAC_UNION_SEMUN -@@ -1868,6 +1869,13 @@ AC_CHECK_TYPES([struct option], [], [], - #include - #endif]) - -+if test x"$pgac_cv__builtin_frame_address" = xno && test "$enable_orca" = yes; then : -+ AC_MSG_ERROR([[ -+Built-in function __builtin_frame_address() is required for ORCA. -+Use --disable-orca to disable ORCA support. -+]]) -+fi -+ - if test "$with_zlib" = yes; then - # Check that defines z_streamp (versions before about 1.0.4 - # did not). While we could work around the lack of z_streamp, it -diff --git a/src/backend/gporca/libgpos/include/gpos/utils.h b/src/backend/gporca/libgpos/include/gpos/utils.h -index b355168d51..8b62ab8901 100644 ---- a/src/backend/gporca/libgpos/include/gpos/utils.h -+++ b/src/backend/gporca/libgpos/include/gpos/utils.h -@@ -19,35 +19,15 @@ - #include "gpos/io/COstreamBasic.h" - #include "gpos/types.h" - --#define GPOS_ASMFP asm volatile("movq %%rbp, %0" : "=g"(ulp)); --#define GPOS_ASMSP asm volatile("movq %%rsp, %0" : "=g"(ulp)); -- --#define ALIGNED_16(x) \ -- (((ULONG_PTR) x >> 1) << 1 == (ULONG_PTR) x) // checks 16-bit alignment --#define ALIGNED_32(x) \ -- (((ULONG_PTR) x >> 2) << 2 == (ULONG_PTR) x) // checks 32-bit alignment --#define ALIGNED_64(x) \ -- (((ULONG_PTR) x >> 3) << 3 == (ULONG_PTR) x) // checks 64-bit alignment -+#define ALIGNED_16(x) (((ULONG_PTR) x >> 1) << 1 == (ULONG_PTR) x) // checks 16-bit alignment -+#define ALIGNED_32(x) (((ULONG_PTR) x >> 2) << 2 == (ULONG_PTR) x) // checks 32-bit alignment -+#define ALIGNED_64(x) (((ULONG_PTR) x >> 3) << 3 == (ULONG_PTR) x) // checks 64-bit alignment - - #define MAX_ALIGNED(x) ALIGNED_64(x) - - #define ALIGN_STORAGE __attribute__((aligned(8))) - --#define GPOS_GET_FRAME_POINTER(x) \ -- do \ -- { \ -- ULONG_PTR ulp; \ -- GPOS_ASMFP; \ -- x = ulp; \ -- } while (0) --#define GPOS_GET_STACK_POINTER(x) \ -- do \ -- { \ -- ULONG_PTR ulp; \ -- GPOS_ASMSP; \ -- x = ulp; \ -- } while (0) -- -+#define GPOS_GET_FRAME_POINTER(x) ((x) = (ULONG_PTR) __builtin_frame_address(0)) - #define GPOS_MSEC_IN_SEC ((ULLONG) 1000) - #define GPOS_USEC_IN_MSEC ((ULLONG) 1000) - #define GPOS_USEC_IN_SEC (((ULLONG) 1000) * 1000) -diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in -index 2d49657429..a699811824 100644 ---- a/src/include/pg_config.h.in -+++ b/src/include/pg_config.h.in -@@ -780,6 +780,9 @@ - /* Define to 1 if your compiler understands __builtin_constant_p. */ - #undef HAVE__BUILTIN_CONSTANT_P - -+/* Define to 1 if your compiler understands __builtin_frame_address. */ -+#undef HAVE__BUILTIN_FRAME_ADDRESS -+ - /* Define to 1 if your compiler understands __builtin_types_compatible_p. */ - #undef HAVE__BUILTIN_TYPES_COMPATIBLE_P - diff --git a/orca2.patch b/orca2.patch deleted file mode 100644 index 3f333e14e6674ace788d92cbc8548672025766bc..0000000000000000000000000000000000000000 --- a/orca2.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 210318e906eb3c4acea48868b822586e31689200 -Author: peifengq -Date: Thu Jul 1 09:47:12 2021 +0800 - - fix orca - -diff --git a/src/backend/gporca/gporca.mk b/src/backend/gporca/gporca.mk -index 0bbedd3339..aa82de4aa4 100644 ---- a/src/backend/gporca/gporca.mk -+++ b/src/backend/gporca/gporca.mk -@@ -5,4 +5,4 @@ override CPPFLAGS := -I$(top_builddir)/src/backend/gporca/libgpdbcost/include $( - # Do not omit frame pointer. Even with RELEASE builds, it is used for - # backtracing. - override CPPFLAGS := -Werror -Wextra -Wpedantic -Wno-variadic-macros -fno-omit-frame-pointer $(CPPFLAGS) --override CPPFLAGS := -std=gnu++98 $(CPPFLAGS) -+override CPPFLAGS := -std=c++14 $(CPPFLAGS) -diff --git a/src/backend/gporca/libgpos/src/common/Makefile b/src/backend/gporca/libgpos/src/common/Makefile -index 9ba83f9ffa..24f453e930 100644 ---- a/src/backend/gporca/libgpos/src/common/Makefile -+++ b/src/backend/gporca/libgpos/src/common/Makefile -@@ -14,7 +14,7 @@ override CPPFLAGS := -I$(top_builddir)/src/backend/gporca/libnaucrates/include $ - override CPPFLAGS := -I$(top_builddir)/src/backend/gporca/libgpdbcost/include $(CPPFLAGS) - # FIXME: Would be better to include gporca.mk, but hitting a warning - override CPPFLAGS := -Wno-variadic-macros -fno-omit-frame-pointer $(CPPFLAGS) --override CPPFLAGS := -std=gnu++98 $(CPPFLAGS) -+override CPPFLAGS := -std=c++14 $(CPPFLAGS) - - OBJS = CAutoTimer.o \ - CBitSet.o \ diff --git a/unittest-fix.patch b/unittest-fix.patch deleted file mode 100644 index c7c99e779ea5bed2fc02605491231d617a92c599..0000000000000000000000000000000000000000 --- a/unittest-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uparN gpdb-6.16.2/src/backend/utils/resgroup/test/resgroup_test.c gpdb-6.16.2_patched/src/backend/utils/resgroup/test/resgroup_test.c ---- gpdb-6.16.2/src/backend/utils/resgroup/test/resgroup_test.c 2021-06-03 15:24:57.000000000 +0800 -+++ gpdb-6.16.2_patched/src/backend/utils/resgroup/test/resgroup_test.c 2021-07-14 09:37:25.907086232 +0800 -@@ -73,6 +73,7 @@ static void - test__CpusetToBitset_bad_arguments(void **state) - { - char cpuset[200]; -+ memset(cpuset, 0, sizeof(cpuset)); - assert_true(!CpusetToBitset(NULL, -1)); - assert_true(!CpusetToBitset(cpuset, -1)); - assert_true(!CpusetToBitset(cpuset, 200)); -