package/timescaledb: bump to version 2.0.0
PATCH 1/1 package/timescaledb: bump to version 2.0.0
Add PG13 patches.
Debug builds (BR2_ENABLE_DEBUG=y) fails because of warnings, so disable WARNINGS_AS_ERRORS.
--- ...1-Allow-building-against-PG13-source.patch | 85 ++++ ...-wrapper-functions-for-base64-encodi.patch | 73 +++ ...003-Add-missing-utils-acl.h-includes.patch | 149 ++++++ ...support-for-PG13-List-implementation.patch | 473 ++++++++++++++++++ ...djust-code-to-PG13-list-sort-changes.patch | 59 +++ ...y-code-to-PG13-addRTEtoQuery-changes.patch | 37 ++ ...G13-convert_tuples_by_name-signature.patch | 65 +++ ...ode-to-PG13-tuple-conversion-changes.patch | 259 ++++++++++ ...hypertable-expansion-to-PG13-changes.patch | 88 ++++ ...decompress-code-to-Var-field-renames.patch | 41 ++ ...1-Adjust-jsonb_utils-to-PG13-changes.patch | 39 ++ ...AT_DropExpression-in-process_utility.patch | 48 ++ ...013-Adjust-copy-code-to-PG13-changes.patch | 34 ++ ...-PG13-command-completion-tag-changes.patch | 186 +++++++ ...-to-PG13-HEAP_INSERT_SKIP_WAL-change.patch | 51 ++ ...ode-to-PG13-planner_hook-signature-c.patch | 58 +++ ...just-code-to-deparse_context-changes.patch | 34 ++ .../timescaledb/0018-Update-compat.h.patch | 27 + package/timescaledb/timescaledb.hash | 2 +- package/timescaledb/timescaledb.mk | 3 +- 20 files changed, 1809 insertions(+), 2 deletions(-) create mode 100644 package/timescaledb/0001-Allow-building-against-PG13-source.patch create mode 100644 package/timescaledb/0002-Add-compatibilty-wrapper-functions-for-base64-encodi.patch create mode 100644 package/timescaledb/0003-Add-missing-utils-acl.h-includes.patch create mode 100644 package/timescaledb/0004-Add-support-for-PG13-List-implementation.patch create mode 100644 package/timescaledb/0005-Adjust-code-to-PG13-list-sort-changes.patch create mode 100644 package/timescaledb/0006-Adjust-copy-code-to-PG13-addRTEtoQuery-changes.patch create mode 100644 package/timescaledb/0007-Adjust-code-to-PG13-convert_tuples_by_name-signature.patch create mode 100644 package/timescaledb/0008-Adjust-code-to-PG13-tuple-conversion-changes.patch create mode 100644 package/timescaledb/0009-Adjust-hypertable-expansion-to-PG13-changes.patch create mode 100644 package/timescaledb/0010-Adjust-decompress-code-to-Var-field-renames.patch create mode 100644 package/timescaledb/0011-Adjust-jsonb_utils-to-PG13-changes.patch create mode 100644 package/timescaledb/0012-Handle-AT_DropExpression-in-process_utility.patch create mode 100644 package/timescaledb/0013-Adjust-copy-code-to-PG13-changes.patch create mode 100644 package/timescaledb/0014-Adjust-code-to-PG13-command-completion-tag-changes.patch create mode 100644 package/timescaledb/0015-Adjust-copy-to-PG13-HEAP_INSERT_SKIP_WAL-change.patch create mode 100644 package/timescaledb/0016-Adjust-planner-code-to-PG13-planner_hook-signature-c.patch create mode 100644 package/timescaledb/0017-Adjust-code-to-deparse_context-changes.patch create mode 100644 package/timescaledb/0018-Update-compat.h.patch
package/timescaledb/0001-Allow-building-against-PG13-source.patch new file +85 -0
@@ -0,0 +1,85 @@ +From 64c17f08c4a78cf6063651632d95906ab3bcb41b Mon Sep 17 00:00:00 2001 +From: Sven Klemm <[email protected]> +Date: Sat, 19 Sep 2020 17:43:52 +0200 +Subject: [PATCH 01/18] Allow building against PG13 source + +This patch adjusts the version checks to allow building against +postgres 13. It also adjusts the cmake version check to allow +building against RC and devel versions. + +Signed-off-by: Maxim Kochetkov <[email protected]> +Fetch from: https://github.com/timescale/timescaledb/commit/21dc9b9c1a307e46eda5fa621488ebeb6ee9636c.patch +--- + CMakeLists.txt | 18 ++++++++---------- + src/compat.h | 7 ++++++- + 2 files changed, 14 insertions(+), 11 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8288b444..ce6e9d48 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -221,27 +221,25 @@ execute_process( + OUTPUT_VARIABLE PG_VERSION_STRING + OUTPUT_STRIP_TRAILING_WHITESPACE) + +-if (NOT ${PG_VERSION_STRING} MATCHES "^PostgreSQL[ ]+([0-9]+)\\.([0-9]+)(\\.([0-9]+))*") ++if (NOT ${PG_VERSION_STRING} MATCHES "^PostgreSQL[ ]+([0-9]+)(\\.([0-9]+)|devel|rc[0-9]+)") + message(FATAL_ERROR "Could not parse PostgreSQL version ${PG_VERSION_STRING}") + endif () + + set(PG_VERSION_MAJOR ${CMAKE_MATCH_1}) +-set(PG_VERSION_MINOR ${CMAKE_MATCH_2}) +-set(PG_VERSION_PATCH ${CMAKE_MATCH_4}) +- +-if (NOT ${PG_VERSION_PATCH} OR ${PG_VERSION_PATCH} EQUAL "") +- set(PG_VERSION "${PG_VERSION_MAJOR}.${PG_VERSION_MINOR}") +-else () +- set(PG_VERSION "${PG_VERSION_MAJOR}.${PG_VERSION_MINOR}.${PG_VERSION_PATCH}") ++if (${CMAKE_MATCH_COUNT} GREATER "2" ) ++ set(PG_VERSION_MINOR ${CMAKE_MATCH_3}) ++else() ++ set(PG_VERSION_MINOR 0) + endif () ++set(PG_VERSION "${PG_VERSION_MAJOR}.${PG_VERSION_MINOR}") + + message(STATUS "Compiling against PostgreSQL version ${PG_VERSION}") + + # Ensure that PostgreSQL version is supported and consistent + # with src/compat.h version check + if ((${PG_VERSION_MAJOR} LESS "11") OR +- (${PG_VERSION_MAJOR} GREATER "12")) +- message(FATAL_ERROR "TimescaleDB only supports PostgreSQL 11 and 12") ++ (${PG_VERSION_MAJOR} GREATER "13")) ++ message(FATAL_ERROR "TimescaleDB only supports PostgreSQL 11, 12 and 13") + endif() + + # Get PostgreSQL configuration from pg_config +diff --git a/src/compat.h b/src/compat.h +index 475217c6..267bb09a 100644 +--- a/src/compat.h ++++ b/src/compat.h +@@ -24,15 +24,20 @@ + + #define is_supported_pg_version_11(version) ((version >= 110000) && (version < 120000)) + #define is_supported_pg_version_12(version) ((version >= 120000) && (version < 130000)) ++#define is_supported_pg_version_13(version) ((version >= 130000) && (version < 140000)) + + #define is_supported_pg_version(version) \ +- (is_supported_pg_version_11(version) || is_supported_pg_version_12(version)) ++ (is_supported_pg_version_11(version) || is_supported_pg_version_12(version) || \ ++ is_supported_pg_version_13(version)) + + #define PG11 is_supported_pg_version_11(PG_VERSION_NUM) + #define PG12 is_supported_pg_version_12(PG_VERSION_NUM) ++#define PG13 is_supported_pg_version_13(PG_VERSION_NUM) + + #define PG12_LT PG11 + #define PG12_GE !(PG12_LT) ++#define PG13_LT !(PG13) ++#define PG13_GE PG13 + + #if !(is_supported_pg_version(PG_VERSION_NUM)) + #error "Unsupported PostgreSQL version" +-- +2.29.2 +
package/timescaledb/0002-Add-compatibilty-wrapper-functions-for-base64-encodi.patch new file +73 -0
73 lines not on this page · raw message
package/timescaledb/0003-Add-missing-utils-acl.h-includes.patch new file +149 -0
149 lines not on this page · raw message
package/timescaledb/0004-Add-support-for-PG13-List-implementation.patch new file +473 -0
473 lines not on this page · raw message
package/timescaledb/0005-Adjust-code-to-PG13-list-sort-changes.patch new file +59 -0
59 lines not on this page · raw message
package/timescaledb/0006-Adjust-copy-code-to-PG13-addRTEtoQuery-changes.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 196943ff91a6a21c575fbca1f047544970ec4c98 Mon Sep 17 00:00:00 2001 +From: Sven Klemm <[email protected]> +Date: Thu, 24 Sep 2020 16:18:43 +0200 +Subject: [PATCH 06/18] Adjust copy code to PG13 addRTEtoQuery changes + +PG13 removes addRTEtoQuery and provides a similar function +addNSItemToQuery which has a different signature. + +https://github.com/postgres/postgres/commit/5815696bc6 + +Signed-off-by: Maxim Kochetkov <[email protected]> +Fetch from: https://github.com/timescale/timescaledb/commit/10d1c2d698c1b7cbf5af86082287adda4f0c6e97.patch +--- + src/copy.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/copy.c b/src/copy.c +index 2e63dc76..c8ce93e6 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -535,7 +535,12 @@ copy_constraints_and_check(ParseState *pstate, Relation rel, List *attnums) + { + ListCell *cur; + char *xactReadOnly; +-#if PG12_GE ++#if PG13_GE ++ ParseNamespaceItem *nsitem = ++ addRangeTableEntryForRelation(pstate, rel, RowExclusiveLock, NULL, false, false); ++ RangeTblEntry *rte = nsitem->p_rte; ++ addNSItemToQuery(pstate, nsitem, true, true, true); ++#elif PG12 + RangeTblEntry *rte = + addRangeTableEntryForRelation(pstate, rel, RowExclusiveLock, NULL, false, false); + addRTEtoQuery(pstate, rte, false, true, true); +-- +2.29.2 +
package/timescaledb/0007-Adjust-code-to-PG13-convert_tuples_by_name-signature.patch new file +65 -0
65 lines not on this page · raw message
package/timescaledb/0008-Adjust-code-to-PG13-tuple-conversion-changes.patch new file +259 -0
259 lines not on this page · raw message
package/timescaledb/0009-Adjust-hypertable-expansion-to-PG13-changes.patch new file +88 -0
88 lines not on this page · raw message
package/timescaledb/0010-Adjust-decompress-code-to-Var-field-renames.patch new file +41 -0
41 lines not on this page · raw message
package/timescaledb/0011-Adjust-jsonb_utils-to-PG13-changes.patch new file +39 -0
@@ -0,0 +1,39 @@ +From aef77c6cf3bac36f93ba44244ecd8a23de701896 Mon Sep 17 00:00:00 2001 +From: Sven Klemm <[email protected]> +Date: Sat, 26 Sep 2020 02:14:28 +0200 +Subject: [PATCH 11/18] Adjust jsonb_utils to PG13 changes + +PG13 moved jsonapi.h from utils to common. + +https://github.com/postgres/postgres/commit/beb4699091 + +Signed-off-by: Maxim Kochetkov <[email protected]> +Fetch from: https://github.com/timescale/timescaledb/pull/2787/commits/aa1e0c8ac78ca109994269c659d52983fe49db7f.patch +--- + src/jsonb_utils.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/jsonb_utils.c b/src/jsonb_utils.c +index 46173871..dd901a38 100644 +--- a/src/jsonb_utils.c ++++ b/src/jsonb_utils.c +@@ -9,9 +9,15 @@ + #include <utils/builtins.h> + #include <utils/json.h> + #include <utils/jsonb.h> +-#include <utils/jsonapi.h> + + #include "compat.h" ++ ++#if PG13_LT ++#include <utils/jsonapi.h> ++#else ++#include <common/jsonapi.h> ++#endif ++ + #include "export.h" + + #include "jsonb_utils.h" +-- +2.29.2 +
package/timescaledb/0012-Handle-AT_DropExpression-in-process_utility.patch new file +48 -0
48 lines not on this page · raw message
package/timescaledb/0013-Adjust-copy-code-to-PG13-changes.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 5cea3a687f7227997deb0eacbb061c586c6713f7 Mon Sep 17 00:00:00 2001 +From: Sven Klemm <[email protected]> +Date: Sat, 26 Sep 2020 02:57:38 +0200 +Subject: [PATCH 13/18] Adjust copy code to PG13 changes + +PG13 adds a CmdType argument to ExecComputeStoredGenerated. + +https://github.com/postgres/postgres/commit/c6679e4fca + +Signed-off-by: Maxim Kochetkov <[email protected]> +Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/a2d15828cbbbe7570afb03bb930df083ddeafd7a.patch +--- + src/copy.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/copy.c b/src/copy.c +index c8ce93e6..e38ae15e 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -379,7 +379,11 @@ copyfrom(CopyChunkState *ccstate, List *range_table, Hypertable *ht, void (*call + /* Compute stored generated columns */ + if (resultRelInfo->ri_RelationDesc->rd_att->constr && + resultRelInfo->ri_RelationDesc->rd_att->constr->has_generated_stored) ++#if PG13_GE ++ ExecComputeStoredGenerated(estate, myslot, CMD_INSERT); ++#else + ExecComputeStoredGenerated(estate, myslot); ++#endif + #endif + /* + * If the target is a plain table, check the constraints of +-- +2.29.2 +
package/timescaledb/0014-Adjust-code-to-PG13-command-completion-tag-changes.patch new file +186 -0
186 lines not on this page · raw message
package/timescaledb/0015-Adjust-copy-to-PG13-HEAP_INSERT_SKIP_WAL-change.patch new file +51 -0
51 lines not on this page · raw message
package/timescaledb/0016-Adjust-planner-code-to-PG13-planner_hook-signature-c.patch new file +58 -0
58 lines not on this page · raw message
package/timescaledb/0017-Adjust-code-to-deparse_context-changes.patch new file +34 -0
@@ -0,0 +1,34 @@ +From d7960c761542d7e90e91a32e91b82459e5fcc84f Mon Sep 17 00:00:00 2001 +From: Sven Klemm <[email protected]> +Date: Sat, 3 Oct 2020 15:53:19 +0200 +Subject: [PATCH 17/18] Adjust code to deparse_context changes + +PG13 changes EXPLAIN to use Plan instead PlanState as context. + +https://github.com/postgres/postgres/commit/6ef77cf46e + +Signed-off-by: Maxim Kochetkov <[email protected]> +Fetch from: https://github.com/timescale/timescaledb/pull/2498/commits/20c5ef33fc9c6d47cd6a95ca79b0b260ee3cfd25.patch +--- + src/chunk_append/explain.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/chunk_append/explain.c b/src/chunk_append/explain.c +index 0111cf72..7ee089c1 100644 +--- a/src/chunk_append/explain.c ++++ b/src/chunk_append/explain.c +@@ -84,7 +84,11 @@ show_sort_group_keys(ChunkAppendState *state, List *ancestors, ExplainState *es) + initStringInfo(&sortkeybuf); + + /* Set up deparsing context */ ++#if PG13_GE ++ context = set_deparse_context_plan(es->deparse_cxt, plan, ancestors); ++#else + context = set_deparse_context_planstate(es->deparse_cxt, (Node *) state, ancestors); ++#endif + useprefix = (list_length(es->rtable) > 1 || es->verbose); + + for (keyno = 0; keyno < nkeys; keyno++) +-- +2.29.2 +
package/timescaledb/0018-Update-compat.h.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 67744f30f481a05e3cb6a2e73c0cb17117a2eb38 Mon Sep 17 00:00:00 2001 +From: fidomax <[email protected]> +Date: Mon, 11 Jan 2021 14:16:06 +0300 +Subject: [PATCH 18/18] Update compat.h + +Signed-off-by: Maxim Kochetkov <[email protected]> +Fetch from: https://github.com/timescale/timescaledb/pull/2801/commits/6a927ee84c91797025fc48ac4aab74c3344ebdad.patch +--- + src/compat.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/compat.h b/src/compat.h +index 1b2ed8e5..6b461e38 100644 +--- a/src/compat.h ++++ b/src/compat.h +@@ -371,7 +371,7 @@ get_vacuum_options(const VacuumStmt *stmt) + #define list_delete_cell_compat(l, lc, prev) list_delete_cell((l), (lc)) + #define list_make5(x1, x2, x3, x4, x5) lappend(list_make4(x1, x2, x3, x4), x5) + #define list_make5_oid(x1, x2, x3, x4, x5) lappend_oid(list_make4_oid(x1, x2, x3, x4), x5) +-#define for_each_cell_compat(cell, list, initcell) for_each_cell ((cell), (list), (initcell)) ++#define for_each_cell_compat(cell, list, initcell) for_each_cell (cell, list, initcell) + #endif + + /* PG13 removes the natts parameter from map_variable_attnos */ +-- +2.29.2 +
package/timescaledb/timescaledb.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 d0b7a153ff3e02ecf033a869ecdf4286f8610ea76140baa84928fc3a80223e99 timescaledb-1.7.4.tar.gz +sha256 f74ebebb4461e4e77273615551ccf9250fac0bdef7bdacf5c92ee3a6884d7782 timescaledb-2.0.0.tar.gz sha256 0378e0948feefd85f579319c74d6e2b671194037f550c7176ef26649d94c895b LICENSE
package/timescaledb/timescaledb.mk +2 -1
@@ -4,7 +4,7 @@ # ################################################################################ -TIMESCALEDB_VERSION = 1.7.4 +TIMESCALEDB_VERSION = 2.0.0 TIMESCALEDB_SITE = $(call github,timescale,timescaledb,$(TIMESCALEDB_VERSION)) TIMESCALEDB_LICENSE = Apache-2.0 TIMESCALEDB_LICENSE_FILES = LICENSE
@@ -17,6 +17,7 @@ TIMESCALEDB_DEPENDENCIES = postgresql # --ldflags and --libs. TIMESCALEDB_CONF_OPTS = \ -DREGRESS_CHECKS=OFF \ + -DWARNINGS_AS_ERRORS=OFF \ -DPG_PKGLIBDIR=lib/postgresql \ -DPG_SHAREDIR=share/postgresql \ -DPG_BINDIR=bin \
Signature · 1 line
2.29.2
PATCH 1/1 package/timescaledb: bump to version 2.0.0
Hello Maxim,
Quoted 36 lines · On Tue, 12 Jan 2021 09:10:25 +0300 Maxim Kochetkov via buildroot…
Add PG13 patches.
Debug builds (BR2_ENABLE_DEBUG=y) fails because of warnings, so disableWARNINGS_AS_ERRORS.Signed-off-by Maxim Kochetkov <[email protected]>--- ...1-Allow-building-against-PG13-source.patch | 85 ++++ ...-wrapper-functions-for-base64-encodi.patch | 73 +++ ...003-Add-missing-utils-acl.h-includes.patch | 149 ++++++ ...support-for-PG13-List-implementation.patch | 473 ++++++++++++++++++ ...djust-code-to-PG13-list-sort-changes.patch | 59 +++ ...y-code-to-PG13-addRTEtoQuery-changes.patch | 37 ++ ...G13-convert_tuples_by_name-signature.patch | 65 +++ ...ode-to-PG13-tuple-conversion-changes.patch | 259 ++++++++++ ...hypertable-expansion-to-PG13-changes.patch | 88 ++++ ...decompress-code-to-Var-field-renames.patch | 41 ++ ...1-Adjust-jsonb_utils-to-PG13-changes.patch | 39 ++ ...AT_DropExpression-in-process_utility.patch | 48 ++ ...013-Adjust-copy-code-to-PG13-changes.patch | 34 ++ ...-PG13-command-completion-tag-changes.patch | 186 +++++++ ...-to-PG13-HEAP_INSERT_SKIP_WAL-change.patch | 51 ++ ...ode-to-PG13-planner_hook-signature-c.patch | 58 +++ ...just-code-to-deparse_context-changes.patch | 34 ++ .../timescaledb/0018-Update-compat.h.patch | 27 + package/timescaledb/timescaledb.hash | 2 +- package/timescaledb/timescaledb.mk | 3 +- 20 files changed, 1809 insertions(+), 2 deletions(-) create mode 100644 package/timescaledb/0001-Allow-building-against-PG13-source.patch create mode 100644 package/timescaledb/0002-Add-compatibilty-wrapper-functions-for-base64-encodi.patch create mode 100644 package/timescaledb/0003-Add-missing-utils-acl.h-includes.patch create mode 100644 package/timescaledb/0004-Add-support-for-PG13-List-implementation.patch create mode 100644 package/timescaledb/0005-Adjust-code-to-PG13-list-sort-changes.patch create mode 100644 package/timescaledb/0006-Adjust-copy-code-to-PG13-addRTEtoQuery-changes.patch create mode 100644 package/timescaledb/0007-Adjust-code-to-PG13-convert_tuples_by_name-signature.patch create mode 100644 package/timescaledb/0008-Adjust-code-to-PG13-tuple-conversion-changes.patch create mode 100644 package/timescaledb/0009-Adjust-hypertable-expansion-to-PG13-changes.patch create mode 100644 package/timescaledb/0010-Adjust-decompress-code-to-Var-field-renames.patch
Quoted 8 lines
create mode 100644 package/timescaledb/0011-Adjust-jsonb_utils-to-PG13-changes.patch create mode 100644 package/timescaledb/0012-Handle-AT_DropExpression-in-process_utility.patch create mode 100644 package/timescaledb/0013-Adjust-copy-code-to-PG13-changes.patch create mode 100644 package/timescaledb/0014-Adjust-code-to-PG13-command-completion-tag-changes.patch create mode 100644 package/timescaledb/0015-Adjust-copy-to-PG13-HEAP_INSERT_SKIP_WAL-change.patch create mode 100644 package/timescaledb/0016-Adjust-planner-code-to-PG13-planner_hook-signature-c.patch create mode 100644 package/timescaledb/0017-Adjust-code-to-deparse_context-changes.patch create mode 100644 package/timescaledb/0018-Update-compat.h.patch
Thanks for the patch. I have applied, even though it is really annoying to carry those 18 patches. Hopefully they will be accepted upstream in the near future.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com