From bc6b5d68de47431c78821782aaaaba53ee57c967 Mon Sep 17 00:00:00 2001 From: Florents Tselai Date: Sat, 21 Sep 2024 16:00:13 +0300 Subject: [PATCH 1/2] In PG 17, the signature for tuplesort_puttuple_common changed. https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=6ed83d5fa55cf6e6c9d1be34ec10730c48eba763 --- src/rumsort.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/rumsort.c b/src/rumsort.c index b5691301c9..3a87500beb 100644 --- a/src/rumsort.c +++ b/src/rumsort.c @@ -492,12 +492,15 @@ rum_tuplesort_putrum(RumTuplesortstate *state, RumSortItem *item) oldcontext = MemoryContextSwitchTo(rum_tuplesort_get_memorycontext(state)); copytup_rum(state, &stup, item); -#if PG_VERSION_NUM >= 160000 +#if PG_VERSION_NUM >= 170000 + tuplesort_puttuple_common(state, &stup, false, GetMemoryChunkSpace(&stup)); +#elif PG_VERSION_NUM == 160000 tuplesort_puttuple_common(state, &stup, false); #else puttuple_common(state, &stup); #endif + MemoryContextSwitchTo(oldcontext); } @@ -510,7 +513,9 @@ rum_tuplesort_putrumitem(RumTuplesortstate *state, RumScanItem *item) oldcontext = MemoryContextSwitchTo(rum_tuplesort_get_memorycontext(state)); copytup_rumitem(state, &stup, item); -#if PG_VERSION_NUM >= 160000 +#if PG_VERSION_NUM >= 170000 + tuplesort_puttuple_common(state, &stup, false, GetMemoryChunkSpace(&stup)); +#elif PG_VERSION_NUM == 160000 tuplesort_puttuple_common(state, &stup, false); #else puttuple_common(state, &stup); From 7873afe4904230064f5c7378b449faba37d69777 Mon Sep 17 00:00:00 2001 From: Florents Tselai Date: Sat, 21 Sep 2024 16:02:42 +0300 Subject: [PATCH 2/2] PG 17 in travis too --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index fd57d799d6..9cd236a889 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,8 @@ notifications: on_failure: always env: + - PG_VERSION=17 + - PG_VERSION=17 LEVEL=hardcore - PG_VERSION=16 - PG_VERSION=16 LEVEL=hardcore - PG_VERSION=15