From dc52c063e82f1ff33785b243f0878ac9ad92a69e Mon Sep 17 00:00:00 2001 From: Pavel Borisov Date: Fri, 27 May 2022 16:16:48 +0400 Subject: [PATCH 1/4] Fix TRACE_START redefinition in PG10 - --- src/disable_core_macro.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/disable_core_macro.h b/src/disable_core_macro.h index ed27ed3c2e..a66862906d 100644 --- a/src/disable_core_macro.h +++ b/src/disable_core_macro.h @@ -16,9 +16,17 @@ #undef TRACE_POSTGRESQL_SORT_START #undef TRACE_POSTGRESQL_SORT_DONE +#if PG_VERSION_NUM >= 110000 #define TRACE_POSTGRESQL_SORT_START(arg1, arg2, arg3, arg4, arg5, arg6) \ +#else +#define TRACE_POSTGRESQL_SORT_START(arg1, arg2, arg3, arg4, arg5) \ +#endif do {} while(0) + + #define TRACE_POSTGRESQL_SORT_DONE(arg1, arg2) \ do {} while(0) + + #endif /* __DISABLE_CORE_MACRO_H__ */ From f03f93d73f02e1e7260bbdecbc86c7bbdcd0ebff Mon Sep 17 00:00:00 2001 From: "Mikhail A. Kulagin" Date: Fri, 27 May 2022 16:19:32 +0300 Subject: [PATCH 2/4] * Fix travis warnings root: deprecated key sudo (The key `sudo` has no effect anymore.) root: missing dist, using the default xenial root: missing os, using the default linux * Add pg-15 --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8952b507cd..8b87257d44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ -sudo: required +os: linux + +dist: bionic language: c @@ -21,6 +23,8 @@ notifications: on_failure: always env: + - PG_VERSION=15beta1 + - PG_VERSION=15beta1 LEVEL=hardcore - PG_VERSION=14 - PG_VERSION=14 LEVEL=hardcore - PG_VERSION=13 From 5bd255b2358bb88bd06c7d80c0e7465120d777b8 Mon Sep 17 00:00:00 2001 From: "Mikhail A. Kulagin" Date: Fri, 27 May 2022 19:42:55 +0300 Subject: [PATCH 3/4] fix gcc-7.5.0 preprocessor error: '#' is not followed by a macro parameter --- src/disable_core_macro.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/disable_core_macro.h b/src/disable_core_macro.h index a66862906d..922ad4cf75 100644 --- a/src/disable_core_macro.h +++ b/src/disable_core_macro.h @@ -18,10 +18,11 @@ #if PG_VERSION_NUM >= 110000 #define TRACE_POSTGRESQL_SORT_START(arg1, arg2, arg3, arg4, arg5, arg6) \ + do {} while(0) #else #define TRACE_POSTGRESQL_SORT_START(arg1, arg2, arg3, arg4, arg5) \ -#endif do {} while(0) +#endif #define TRACE_POSTGRESQL_SORT_DONE(arg1, arg2) \ From 48138385c8fbb6ab61804ac36d26880446d7babc Mon Sep 17 00:00:00 2001 From: "Mikhail A. Kulagin" Date: Fri, 27 May 2022 20:15:27 +0300 Subject: [PATCH 4/4] try to fix clang scan-build warning: Division by zero [core.DivideZero] --- src/tuplesort15.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tuplesort15.c b/src/tuplesort15.c index 6f7a59f5d6..fb9a8ac0b3 100644 --- a/src/tuplesort15.c +++ b/src/tuplesort15.c @@ -2946,6 +2946,7 @@ selectnewtape(Tuplesortstate *state) * We have reached the max number of tapes. Append to an existing * tape. */ + Assert(state->nOutputTapes != 0); state->destTape = state->outputTapes[state->nOutputRuns % state->nOutputTapes]; state->nOutputRuns++; }