diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e2eac926..09840e823 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -504,18 +504,6 @@ if(NOT EXISTS ${PG_INCLUDEDIR}/pg_config.h) ) endif() -# This is currently only available in snapshot branches so we cannot use the -# normal pg version check to determine availability. -if(EXISTS ${PG_INCLUDEDIR_SERVER}/utils/rel.h) - file(READ ${PG_INCLUDEDIR_SERVER}/utils/rel.h PG_UTILS_REL_H) - string(REGEX MATCH "RelationGetSmgr" PG_HAVE_RELATION_GET_SMGR - ${PG_UTILS_REL_H}) -endif() - -if(PG_HAVE_RELATION_GET_SMGR) - add_compile_definitions(PG_HAVE_RELATION_GET_SMGR=1) -endif() - file(READ ${PG_INCLUDEDIR}/pg_config.h PG_CONFIG_H) string(REGEX MATCH "#define USE_ASSERT_CHECKING 1" PG_USE_ASSERT_CHECKING ${PG_CONFIG_H}) diff --git a/src/compat/compat.h b/src/compat/compat.h index 290564eae..d49edafd7 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -759,8 +759,8 @@ pg_strtoint64(const char *str) is_crosspart_update) #endif -#if PG13_GE -#ifndef PG_HAVE_RELATION_GET_SMGR +#if (PG12 && PG_VERSION_NUM < 120014) || (PG13 && PG_VERSION_NUM < 130010) || \ + (PG14 && PG_VERSION_NUM < 140007) #include /* * RelationGetSmgr @@ -787,6 +787,5 @@ RelationGetSmgr(Relation rel) return rel->rd_smgr; } #endif -#endif #endif /* TIMESCALEDB_COMPAT_H */