Skip to content

Commit

Permalink
Only install the latest compatible version of timescaledb
Browse files Browse the repository at this point in the history
  • Loading branch information
idanovinda committed Nov 8, 2024
1 parent d07ca8c commit c38bbd9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions postgres-appliance/build_scripts/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,15 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do
"postgresql-${version}-pg-stat-kcache" \
"${EXTRAS[@]}"

# Clean up timescaledb versions except the highest compatible version
highest_version=$(find /usr/lib/postgresql/"${version}"/lib/timescaledb-2.*.so | sort -V | tail -n 1)
find /usr/lib/postgresql/"${version}"/lib/ -name 'timescaledb-2.*.so' ! -path "${highest_version}" -exec rm -f {} \;

if [ "${TIMESCALEDB_APACHE_ONLY}" = "false" ]; then
highest_version_tsl=$(find /usr/lib/postgresql/"${version}"/lib/timescaledb-tsl-2.*.so | sort -V | tail -n 1)
find /usr/lib/postgresql/"${version}"/lib/ -name 'timescaledb-tsl-2.*.so' ! -path "${highest_version_tsl}" -exec rm -f {} \;
fi

# Install 3rd party stuff

if [ "${TIMESCALEDB_APACHE_ONLY}" != "true" ] && [ "${TIMESCALEDB_TOOLKIT}" = "true" ]; then
Expand Down

0 comments on commit c38bbd9

Please sign in to comment.