Skip to content

Commit 6d5535e

Browse files
committed
add hypopg extension
Signed-off-by: Piyush Raj <[email protected]>
1 parent f7f2115 commit 6d5535e

File tree

6 files changed

+97
-5
lines changed

6 files changed

+97
-5
lines changed

.github/workflows/smoke-test.yml

+4
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ jobs:
9595
psql -c "CREATE SCHEMA partman;"
9696
psql -c "CREATE EXTENSION pg_partman SCHEMA partman;"
9797
98+
echo "Test HypoPG Extension"
99+
psql -c "CREATE EXTENSION hypopg;"
100+
psql -c "CREATE TABLE hypo AS SELECT id, 'line ' || id AS val FROM generate_series(1,10000) id;"
101+
psql -c "EXPLAIN SELECT * FROM hypo WHERE id = 1;"
98102
break
99103
fi
100104
sleep 1

Dockerfile

+37-1
Original file line numberDiff line numberDiff line change
@@ -390,4 +390,40 @@ RUN set -e \
390390
&& cd / \
391391
&& rm /tmp/pg_partman.tar.gz \
392392
&& rm -rf /tmp/pg_partman \
393-
&& apk del .pg_partman-deps .pg_partman-build-deps
393+
&& apk del .pg_partman-deps .pg_partman-build-deps
394+
395+
396+
# Adding hypo_pg
397+
ARG HYPOPG_VERSION
398+
399+
RUN set -ex \
400+
&& cd /tmp\
401+
&& apk add --no-cache --virtual .hypopg-deps \
402+
ca-certificates \
403+
openssl \
404+
tar \
405+
&& apk add --no-cache --virtual .hypopg-build-deps \
406+
autoconf \
407+
automake \
408+
g++ \
409+
clang15 \
410+
llvm15 \
411+
libtool \
412+
libxml2-dev \
413+
make \
414+
perl \
415+
&& wget -O hypopg.tar.gz "https://github.com/HypoPG/hypopg/archive/refs/tags/${HYPOPG_VERSION}.tar.gz" \
416+
&& mkdir -p /tmp/hypopg \
417+
&& tar \
418+
--extract \
419+
--file hypopg.tar.gz \
420+
--directory /tmp/hypopg \
421+
--strip-components 1 \
422+
&& cd /tmp/hypopg \
423+
&& make \
424+
&& make install \
425+
# clean
426+
&& cd / \
427+
&& rm /tmp/hypopg.tar.gz \
428+
&& rm -rf /tmp/hypopg \
429+
&& apk del .hypopg-deps .hypopg-build-deps

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PG_AUTO_FAILOVER_VERSION=2.1
1313
POSTGRES_HLL_VERSION=2.18
1414
PG_JOBMON_VERSION=1.4.1
1515
PG_PARTMAN_VERSION=5.0.1
16+
HYPOPG_VERSION=1.4.0
1617
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 = !!')
1718
PREV_TS_IMAGE="timescale/timescaledb:$(PREV_TS_VERSION)-pg$(PG_VER_NUMBER)$(PREV_EXTRA)"
1819
PREV_IMAGE=$(shell if docker pull $(PREV_TS_IMAGE) >/dev/null; then echo "$(PREV_TS_IMAGE)"; else echo "postgres:$(PG_VER_NUMBER)-alpine"; fi )
@@ -42,8 +43,8 @@ DOCKER_BUILD_ARGS = --build-arg TS_VERSION=$(TS_VERSION) \
4243
--build-arg PG_AUTO_FAILOVER_VERSION=$(PG_AUTO_FAILOVER_VERSION) \
4344
--build-arg POSTGRES_HLL_VERSION=$(POSTGRES_HLL_VERSION)\
4445
--build-arg PG_JOBMON_VERSION=$(PG_JOBMON_VERSION) \
45-
--build-arg PG_PARTMAN_VERSION=$(PG_PARTMAN_VERSION)
46-
46+
--build-arg PG_PARTMAN_VERSION=$(PG_PARTMAN_VERSION) \
47+
--build-arg HYPOPG_VERSION=$(HYPOPG_VERSION)
4748

4849

4950
default: image

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- [x] [PgAutoFailover](https://github.com/hapostgres/pg_auto_failover)
1414
- [x] [PgJobmon](https://github.com/omniti-labs/pg_jobmon)
1515
- [x] [PgPartman](https://github.com/pgpartman/pg_partman)
16-
16+
- [x] [HypoPG](https://github.com/HypoPG/hypopg)
1717

1818
## Releases
1919
- [Versioning Policy](./docs/version-policy.md)

bitnami/Dockerfile

+49
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,55 @@ RUN set -ex \
427427
&& rm /tmp/pg_partman.tar.gz \
428428
&& rm -rf /tmp/pg_partman
429429

430+
# Adding hypopg
431+
ARG HYPOPG_VERSION
432+
433+
RUN set -e \
434+
&& cd /tmp\
435+
&& apt-get update \
436+
&& apt-get install -y \
437+
ca-certificates \
438+
openssl \
439+
tar \
440+
autoconf \
441+
automake \
442+
g++ \
443+
clang \
444+
llvm \
445+
libtool \
446+
libxml2-dev \
447+
make \
448+
perl \
449+
wget \
450+
&& wget -O hypopg.tar.gz "https://github.com/HypoPG/hypopg/archive/refs/tags/${HYPOPG_VERSION}.tar.gz" \
451+
&& mkdir -p /tmp/hypopg \
452+
&& tar \
453+
--extract \
454+
--file hypopg.tar.gz \
455+
--directory /tmp/hypopg \
456+
--strip-components 1 \
457+
&& cd /tmp/hypopg \
458+
&& make \
459+
&& make install \
460+
# clean
461+
&& cd / \
462+
&& rm /tmp/hypopg.tar.gz \
463+
&& rm -rf /tmp/hypopg \
464+
&& apt-get autoremove --purge -y \
465+
autoconf \
466+
automake \
467+
g++ \
468+
clang \
469+
llvm \
470+
make \
471+
perl \
472+
wget \
473+
&& apt-get clean -y \
474+
&& rm -rf \
475+
/var/lib/apt/lists/* \
476+
/tmp/* \
477+
/var/tmp/*
478+
430479
USER 1001
431480

432481
ENTRYPOINT [ "/opt/bitnami/scripts/postgresql/timescaledb-bitnami-entrypoint.sh" ]

bitnami/Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PG_REPACK_VERSION=1.5.0
1313
POSTGRES_HLL_VERSION=2.18
1414
PG_JOBMON_VERSION=1.4.1
1515
PG_PARTMAN_VERSION=5.0.1
16+
HYPOPG_VERSION=1.4.0
1617
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 = !!')
1718
PREV_TS_IMAGE="timescale/timescaledb:$(PREV_TS_VERSION)-pg$(PG_VER_NUMBER)-bitnami"
1819
PREV_IMAGE=$(shell if docker pull $(PREV_TS_IMAGE) >/dev/null; then echo "$(PREV_TS_IMAGE)"; else echo "bitnami/postgresql:$(PG_VER_NUMBER)"; fi )
@@ -39,7 +40,8 @@ DOCKER_BUILD_ARGS = --build-arg PG_VERSION=$(PG_VER_NUMBER) \
3940
--build-arg PG_AUTO_FAILOVER_VERSION=$(PG_AUTO_FAILOVER_VERSION) \
4041
--build-arg POSTGRES_HLL_VERSION=$(POSTGRES_HLL_VERSION)\
4142
--build-arg PG_JOBMON_VERSION=$(PG_JOBMON_VERSION) \
42-
--build-arg PG_PARTMAN_VERSION=$(PG_PARTMAN_VERSION)
43+
--build-arg PG_PARTMAN_VERSION=$(PG_PARTMAN_VERSION) \
44+
--build-arg HYPOPG_VERSION=$(HYPOPG_VERSION)
4345

4446

4547
default: image

0 commit comments

Comments
 (0)