Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jobs:
psql -c "INSERT INTO test_geometry_table (geom) VALUES (ST_GeomFromText('POINT(0 0)', 4326));"
psql -c "SELECT * FROM test_geometry_table;"

echo "Test HyperLogLog Extension"
psql -c "CREATE EXTENSION hll;"
psql -c "select hll_hash_text('hello world');"

echo "Test Citus Extension"
psql -c "CREATE EXTENSION citus;"
psql -c "SELECT * FROM citus_version();"
Expand Down
28 changes: 27 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,30 @@ RUN set -eux \
# clean
&& cd / \
&& rm -rf /tmp/pg_auto_failove-${PG_AUTO_FAILOVER_VERSION} /tmp/pg_auto_failove-${PG_AUTO_FAILOVER_VERSION}.zip \
&& apk del .pg_auto_failover-build-deps
&& apk del .pg_auto_failover-build-deps

## Adding postgresql-hll
ARG POSTGRES_HLL_VERSION
RUN set -eux \
&& apk add --no-cache --virtual .postgresql-hll-build-deps \
openssl-dev \
zstd-dev \
lz4-dev \
zlib-dev \
make \
git \
clang15 \
gawk \
llvm15 \
g++ \
musl-dev \
# build postgresql-hll
&& wget -O /tmp/postgresql-hll-${POSTGRES_HLL_VERSION}.zip "https://github.com/citusdata/postgresql-hll/archive/refs/tags/v${POSTGRES_HLL_VERSION}.zip" \
&& unzip /tmp/postgresql-hll-${POSTGRES_HLL_VERSION}.zip -d /tmp \
&& cd /tmp/postgresql-hll-${POSTGRES_HLL_VERSION} \
&& make \
&& make install \
# clean
&& cd / \
&& rm -rf /tmp/postgresql-hll-${POSTGRES_HLL_VERSION} /tmp/postgresql-hll-${POSTGRES_HLL_VERSION}.zip \
&& apk del .postgresql-hll-build-deps
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ POSTGIS_VERSION=3.4.2
CITUS_VERSION=12.1.0
PG_REPACK_VERSION=1.5.0
PG_AUTO_FAILOVER_VERSION=2.1
POSTGRES_HLL_VERSION=2.18
PREV_TS_VERSION=$(shell wget --quiet -O - https://raw.githubusercontent.com/timescale/timescaledb/${TS_VERSION}/version.config | grep update_from_version | sed -e 's!update_from_version = !!')
PREV_TS_IMAGE="timescale/timescaledb:$(PREV_TS_VERSION)-pg$(PG_VER_NUMBER)$(PREV_EXTRA)"
PREV_IMAGE=$(shell if docker pull $(PREV_TS_IMAGE) >/dev/null; then echo "$(PREV_TS_IMAGE)"; else echo "postgres:$(PG_VER_NUMBER)-alpine"; fi )
Expand All @@ -35,6 +36,7 @@ DOCKER_BUILD_ARGS = --build-arg TS_VERSION=$(TS_VERSION) \
--build-arg PG_CRON_VERSION=$(PG_CRON_VERSION) \
--build-arg PG_REPACK_VERSION=$(PG_REPACK_VERSION)\
--build-arg POSTGIS_VERSION=$(POSTGIS_VERSION) \
--build-arg POSTGRES_HLL_VERSION=$(POSTGRES_HLL_VERSION)\
--build-arg CITUS_VERSION=$(CITUS_VERSION) \
--build-arg PG_AUTO_FAILOVER_VERSION=$(PG_AUTO_FAILOVER_VERSION)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [x] [TimescaleDB](https://github.com/timescale/timescaledb)
- [x] [PgCron](https://github.com/citusdata/pg_cron)
- [x] [PostGIS](https://postgis.net)
- [x] [postgresql-hll](https://github.com/citusdata/postgresql-hll)
- [x] [Citus](https://www.citusdata.com/)
- [x] [Pg Repack](https://github.com/reorg/pg_repack)
- [x] [PgAutoFailover](https://github.com/hapostgres/pg_auto_failover)
Expand Down
32 changes: 32 additions & 0 deletions bitnami/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,38 @@ RUN apt-get update \
/tmp/* \
/var/tmp/*

## Adding postgresql-hll
ARG POSTGRES_HLL_VERSION
RUN apt-get update \
&& apt-get install -y unzip \
build-essential \
liblz4-dev \
zlib1g-dev \
libedit-dev \
libssl-dev \
wget \
# build postgresql-hll
&& wget -O /tmp/postgresql-hll-${POSTGRES_HLL_VERSION}.zip "https://github.com/citusdata/postgresql-hll/archive/refs/tags/v${POSTGRES_HLL_VERSION}.zip" \
&& unzip /tmp/postgresql-hll-${POSTGRES_HLL_VERSION}.zip -d /tmp \
&& cd /tmp/postgresql-hll-${POSTGRES_HLL_VERSION} \
&& make \
&& make install \
# clean
&& cd / \
&& rm -rf /tmp/postgresql-hll-${POSTGRES_HLL_VERSION} /tmp/postgresql-hll-${POSTGRES_HLL_VERSION}.zip \
&& apt-get autoremove --purge -y \
unzip \
build-essential \
liblz4-dev \
libedit-dev \
libssl-dev \
wget \
&& apt-get clean -y \
&& rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/*

USER 1001

ENTRYPOINT [ "/opt/bitnami/scripts/postgresql/timescaledb-bitnami-entrypoint.sh" ]
Expand Down
2 changes: 2 additions & 0 deletions bitnami/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TS_VERSION=2.13.0
POSTGIS_VERSION=3.4.2
CITUS_VERSION=12.1.0
PG_REPACK_VERSION=1.5.0
POSTGRES_HLL_VERSION=2.18
PREV_TS_VERSION=$(shell wget --quiet -O - https://raw.githubusercontent.com/timescale/timescaledb/${TS_VERSION}/version.config | grep update_from_version | sed -e 's!update_from_version = !!')
PREV_TS_IMAGE="timescale/timescaledb:$(PREV_TS_VERSION)-pg$(PG_VER_NUMBER)-bitnami"
PREV_IMAGE=$(shell if docker pull $(PREV_TS_IMAGE) >/dev/null; then echo "$(PREV_TS_IMAGE)"; else echo "bitnami/postgresql:$(PG_VER_NUMBER)"; fi )
Expand All @@ -32,6 +33,7 @@ DOCKER_BUILD_ARGS = --build-arg PG_VERSION=$(PG_VER_NUMBER) \
--build-arg PG_CRON_VERSION=$(PG_CRON_VERSION) \
--build-arg PG_REPACK_VERSION=$(PG_REPACK_VERSION) \
--build-arg POSTGIS_VERSION=$(POSTGIS_VERSION) \
--build-arg POSTGRES_HLL_VERSION=$(POSTGRES_HLL_VERSION)\
--build-arg CITUS_VERSION=$(CITUS_VERSION) \
--build-arg PG_AUTO_FAILOVER_VERSION=$(PG_AUTO_FAILOVER_VERSION)

Expand Down
4 changes: 2 additions & 2 deletions bitnami/timescaledb-bitnami-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# shared preload list, or else it gets overwritten.
if [ -z "$POSTGRESQL_SHARED_PRELOAD_LIBRARIES" ]
then
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,pg_cron,pgautofailover"
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,pg_cron,pgautofailover,hll"
else
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,pg_cron,pgautofailover,$POSTGRESQL_SHARED_PRELOAD_LIBRARIES"
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,pg_cron,pgautofailover,hll,$POSTGRESQL_SHARED_PRELOAD_LIBRARIES"
fi
export POSTGRESQL_SHARED_PRELOAD_LIBRARIES

Expand Down