Skip to content

Commit 1aae405

Browse files
authored
Fix PostGIS, Citus builds (#134)
* update postgis: - utilize system headers for compilation - patch postgis version to 3.4.2 Signed-off-by: Piyush Raj <[email protected]> * Update shared_preload_libraries order Signed-off-by: Piyush Raj <[email protected]> --------- Signed-off-by: Piyush Raj <[email protected]>
1 parent 739e4b6 commit 1aae405

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ RUN set -ex \
7575

7676

7777
# Update to shared_preload_libraries
78-
RUN echo "shared_preload_libraries = 'timescaledb,pg_cron,citus'" >> /usr/local/share/postgresql/postgresql.conf.sample
78+
RUN echo "shared_preload_libraries = 'citus,timescaledb,pg_cron'" >> /usr/local/share/postgresql/postgresql.conf.sample
7979
# Adding PG Vector
8080

8181
RUN cd /tmp
@@ -218,7 +218,7 @@ RUN set -ex \
218218
curl-dev \
219219
lz4-dev \
220220
zstd-dev \
221-
clang-15 \
221+
clang15 \
222222
krb5-dev \
223223
icu-dev \
224224
libxslt-dev \

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PG_VER=pg15
66
PG_VER_NUMBER=$(shell echo $(PG_VER) | cut -c3-)
77
TS_VERSION=2.13.0
88
PG_CRON_VERSION=v1.6.0
9-
POSTGIS_VERSION=3.4.1
9+
POSTGIS_VERSION=3.4.2
1010
CITUS_VERSION=12.1.0
1111
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 = !!')
1212
PREV_TS_IMAGE="timescale/timescaledb:$(PREV_TS_VERSION)-pg$(PG_VER_NUMBER)$(PREV_EXTRA)"

bitnami/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ RUN set -eux \
177177
g++\
178178
gcc \
179179
make \
180+
libpcre3-dev \
180181
&& wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/${POSTGIS_VERSION}.tar.gz" \
181182
&& mkdir -p /usr/src/postgis \
182183
&& tar \
@@ -189,10 +190,11 @@ RUN set -eux \
189190
# build PostGIS
190191
\
191192
&& cd /usr/src/postgis \
192-
&& gettextize \
193193
&& ./autogen.sh \
194194
&& ./configure \
195-
--with-pcredir="$(pcre-config --prefix)" --with-geosconfig="/usr/bin/geos-config"\
195+
--with-pcredir="$(pcre-config --prefix)" \
196+
--with-geosconfig="/usr/bin/geos-config" \
197+
CFLAGS="-idirafter'/opt/bitnami/postgresql/include'" # # Prefer latest system headers over Bitnami outdated libraries \
196198
&& make -j$(nproc) \
197199
&& make install \
198200
&& cd / \

bitnami/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PG_VER=pg15
66
PG_VER_NUMBER=$(shell echo $(PG_VER) | cut -c3-)
77
PG_CRON_VERSION=v1.6.0
88
TS_VERSION=2.13.0
9-
POSTGIS_VERSION=3.4.1
9+
POSTGIS_VERSION=3.4.2
1010
CITUS_VERSION=12.1.0
1111
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 = !!')
1212
PREV_TS_IMAGE="timescale/timescaledb:$(PREV_TS_VERSION)-pg$(PG_VER_NUMBER)-bitnami"

bitnami/timescaledb-bitnami-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# shared preload list, or else it gets overwritten.
55
if [ -z "$POSTGRESQL_SHARED_PRELOAD_LIBRARIES" ]
66
then
7-
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="timescaledb,pg_cron,citus"
7+
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,pg_cron"
88
else
9-
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="$POSTGRESQL_SHARED_PRELOAD_LIBRARIES,timescaledb,pg_cron,citus"
9+
POSTGRESQL_SHARED_PRELOAD_LIBRARIES="citus,timescaledb,pg_cron,$POSTGRESQL_SHARED_PRELOAD_LIBRARIES"
1010
fi
1111
export POSTGRESQL_SHARED_PRELOAD_LIBRARIES
1212

0 commit comments

Comments
 (0)