Skip to content

Commit a036964

Browse files
committed
add hypopg extension
Signed-off-by: Piyush Raj <[email protected]>
1 parent 7fd3328 commit a036964

File tree

6 files changed

+98
-4
lines changed

6 files changed

+98
-4
lines changed

.github/workflows/smoke-test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ jobs:
6565
psql -c "INSERT INTO test_geometry_table (geom) VALUES (ST_GeomFromText('POINT(0 0)', 4326));"
6666
psql -c "SELECT * FROM test_geometry_table;"
6767
68+
echo "Test HypoPG Extension"
69+
psql -c "CREATE EXTENSION hypopg;"
70+
psql -c "CREATE TABLE hypo AS SELECT id, 'line ' || id AS val FROM generate_series(1,10000) id;"
71+
psql -c "EXPLAIN SELECT * FROM hypo WHERE id = 1;"
72+
6873
break
6974
fi
7075
sleep 1

Dockerfile

+37-1
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,40 @@ RUN set -eux \
200200
# clean
201201
&& cd / \
202202
&& rm -rf /usr/src/postgis \
203-
&& apk del .fetch-deps .build-deps
203+
&& apk del .fetch-deps .build-deps
204+
205+
206+
# Adding hypo_pg
207+
ARG HYPOPG_VERSION
208+
209+
RUN set -ex \
210+
&& cd /tmp\
211+
&& apk add --no-cache --virtual .hypopg-deps \
212+
ca-certificates \
213+
openssl \
214+
tar \
215+
&& apk add --no-cache --virtual .hypopg-build-deps \
216+
autoconf \
217+
automake \
218+
g++ \
219+
clang15 \
220+
llvm15 \
221+
libtool \
222+
libxml2-dev \
223+
make \
224+
perl \
225+
&& wget -O hypopg.tar.gz "https://github.com/HypoPG/hypopg/archive/refs/tags/${HYPOPG_VERSION}.tar.gz" \
226+
&& mkdir -p /tmp/hypopg \
227+
&& tar \
228+
--extract \
229+
--file hypopg.tar.gz \
230+
--directory /tmp/hypopg \
231+
--strip-components 1 \
232+
&& cd /tmp/hypopg \
233+
&& make \
234+
&& make install \
235+
# clean
236+
&& cd / \
237+
&& rm /tmp/hypopg.tar.gz \
238+
&& rm -rf /tmp/hypopg \
239+
&& apk del .hypopg-deps .hypopg-build-deps

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PG_VER_NUMBER=$(shell echo $(PG_VER) | cut -c3-)
77
TS_VERSION=2.13.0
88
PG_CRON_VERSION=v1.6.0
99
POSTGIS_VERSION=3.4.1
10+
HYPOPG_VERSION=1.4.0
1011
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 = !!')
1112
PREV_TS_IMAGE="timescale/timescaledb:$(PREV_TS_VERSION)-pg$(PG_VER_NUMBER)$(PREV_EXTRA)"
1213
PREV_IMAGE=$(shell if docker pull $(PREV_TS_IMAGE) >/dev/null; then echo "$(PREV_TS_IMAGE)"; else echo "postgres:$(PG_VER_NUMBER)-alpine"; fi )
@@ -30,7 +31,8 @@ DOCKER_BUILD_ARGS = --build-arg TS_VERSION=$(TS_VERSION) \
3031
--build-arg PG_VERSION=$(PG_VER_NUMBER) \
3132
--build-arg PREV_IMAGE=$(PREV_IMAGE) \
3233
--build-arg PG_CRON_VERSION=$(PG_CRON_VERSION) \
33-
--build-arg POSTGIS_VERSION=$(POSTGIS_VERSION)
34+
--build-arg POSTGIS_VERSION=$(POSTGIS_VERSION) \
35+
--build-arg HYPOPG_VERSION=$(HYPOPG_VERSION)
3436

3537

3638
default: image

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- [x] [PgCron ](https://github.com/citusdata/pg_cron)
99
- [x] [PostGIS](https://postgis.net)
1010
- [ ] [Citus](https://www.citusdata.com/)
11-
11+
- [x] [HypoPG](https://github.com/HypoPG/hypopg)
1212
## Releases
1313
- [Versioning Policy](./docs/version-policy.md)
1414

bitnami/Dockerfile

+49
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,55 @@ RUN set -eux \
208208
/tmp/* \
209209
/var/tmp/*
210210

211+
# Adding hypopg
212+
ARG HYPOPG_VERSION
213+
214+
RUN set -e \
215+
&& cd /tmp\
216+
&& apt-get update \
217+
&& apt-get install -y \
218+
ca-certificates \
219+
openssl \
220+
tar \
221+
autoconf \
222+
automake \
223+
g++ \
224+
clang \
225+
llvm \
226+
libtool \
227+
libxml2-dev \
228+
make \
229+
perl \
230+
wget \
231+
&& wget -O hypopg.tar.gz "https://github.com/HypoPG/hypopg/archive/refs/tags/${HYPOPG_VERSION}.tar.gz" \
232+
&& mkdir -p /tmp/hypopg \
233+
&& tar \
234+
--extract \
235+
--file hypopg.tar.gz \
236+
--directory /tmp/hypopg \
237+
--strip-components 1 \
238+
&& cd /tmp/hypopg \
239+
&& make \
240+
&& make install \
241+
# clean
242+
&& cd / \
243+
&& rm /tmp/hypopg.tar.gz \
244+
&& rm -rf /tmp/hypopg \
245+
&& apt-get autoremove --purge -y \
246+
autoconf \
247+
automake \
248+
g++ \
249+
clang \
250+
llvm \
251+
make \
252+
perl \
253+
wget \
254+
&& apt-get clean -y \
255+
&& rm -rf \
256+
/var/lib/apt/lists/* \
257+
/tmp/* \
258+
/var/tmp/*
259+
211260
USER 1001
212261

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

bitnami/Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PG_VER_NUMBER=$(shell echo $(PG_VER) | cut -c3-)
77
PG_CRON_VERSION=v1.6.0
88
TS_VERSION=2.13.0
99
POSTGIS_VERSION=3.4.1
10+
HYPOPG_VERSION=1.4.0
1011
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 = !!')
1112
PREV_TS_IMAGE="timescale/timescaledb:$(PREV_TS_VERSION)-pg$(PG_VER_NUMBER)-bitnami"
1213
PREV_IMAGE=$(shell if docker pull $(PREV_TS_IMAGE) >/dev/null; then echo "$(PREV_TS_IMAGE)"; else echo "bitnami/postgresql:$(PG_VER_NUMBER)"; fi )
@@ -27,7 +28,8 @@ DOCKER_BUILD_ARGS = --build-arg PG_VERSION=$(PG_VER_NUMBER) \
2728
--build-arg TS_VERSION=$(TS_VERSION) \
2829
--build-arg PREV_IMAGE=$(PREV_IMAGE) \
2930
--build-arg PG_CRON_VERSION=$(PG_CRON_VERSION) \
30-
--build-arg POSTGIS_VERSION=$(POSTGIS_VERSION)
31+
--build-arg POSTGIS_VERSION=$(POSTGIS_VERSION) \
32+
--build-arg HYPOPG_VERSION=$(HYPOPG_VERSION)
3133

3234

3335
default: image

0 commit comments

Comments
 (0)