From 21d23cb58138c3ade65102651592a1f49067a2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADzio=20de=20Royes=20Mello?= Date: Thu, 21 Nov 2024 10:42:42 -0300 Subject: [PATCH] Fix building against PG14.0 In #7467 we added a `RelationCacheInvalidate(false)` but on upstream this API changed on PG14.1 by postgres/postgres@dde966e. We build agains first minor release in our nightly CI and also on ABI tests so make sure we're using the right function call based on the Postgres version we're building against. https://github.com/timescale/timescaledb/actions/runs/11943958854/job/33294019881#step:12:360 --- tsl/src/hypercore/hypercore_handler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tsl/src/hypercore/hypercore_handler.c b/tsl/src/hypercore/hypercore_handler.c index aace3053c4a..72ba4c1d61f 100644 --- a/tsl/src/hypercore/hypercore_handler.c +++ b/tsl/src/hypercore/hypercore_handler.c @@ -3491,7 +3491,11 @@ convert_to_hypercore_finish(Oid relid) * relcache invalidations. Previously there was sometimes a crash here * because the tuple sort state had a reference to a tuple descriptor in * the relcache. */ +#if (PG_VERSION_NUM >= 140001) RelationCacheInvalidate(false); +#else + RelationCacheInvalidate(); +#endif #endif Chunk *chunk = ts_chunk_get_by_relid(conversionstate->relid, true);