Skip to main content

Timescaledb

Building Timescaledb extension for ClearOS v6 & v7

The timescaledb plugin needs to be built against the custom OpenSSL build, and with telemetry disabled. The desired Postgres which pg_config needs to be live on the shell.

Download the package and compile

export TIMESCALEDB_VERSION='2.11.2'
export PG_VERSION=15
export OPENSSL_ROOT_DIR=/usr/local/ssl

wget https://github.com/timescale/timescaledb/tags/${TIMESCALEDB_VERSION}.tar.gz
tar -zxvf ${TIMESCALEDB_VERSION}.tar.gz
cd timescaledb-${TIMESCALEDB_VERSION}
./bootstrap -DUSE_TELEMETRY='off'
cd build && make && make install

Build installer

mkdir -p /tmp/timescaledb/usr/pgsql-${PG_VERSION}/{lib,share}
mkdir -p /tmp/timescaledb/usr/pgsql-${PG_VERSION}/share/extension

cp /usr/pgsql-${PG_VERSION}/lib/timescaledb* /tmp/timescaledb/usr/pgsql-${PG_VERSION}/lib/
cp /usr/pgsql-${PG_VERSION}/share/extension/timescaledb* /tmp/timescaledb/usr/pgsql-${PG_VERSION}/share/extension/

fpm -s dir -t rpm -n timescaledb_${PG_VERSION} -v ${TIMESCALEDB_VERSION} -C /tmp/timescaledb