Skip to content

Commit

Permalink
Ensure PostgreSQL 16 is available in Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
feikesteenbergen committed Oct 13, 2023
1 parent 4f28156 commit 1bc777e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fail-fast: false
max-parallel: 12
matrix:
pgversion: [12, 13, 14, 15]
pgversion: [12, 13, 14, 15, 16]
container: "${{ \
( \
inputs.all-platforms || \
Expand Down
18 changes: 14 additions & 4 deletions docker/ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ BUILDER_HOME=$6
case $OS_NAME in
centos | rockylinux)
PG_BASE=/usr/pgsql-
if [ $OS_VERSION == "7" ]; then
# PostgreSQL packages for 16+ are not available here
PG_VERSIONS="${RHEL7_PG_VERSIONS}"
fi
;;
debian | ubuntu)
PG_BASE=/usr/lib/postgresql/
Expand Down Expand Up @@ -133,10 +137,13 @@ EOF
for pg in $PG_VERSIONS; do
yum -q -y install \
postgresql$pg-devel \
postgresql$pg-server \
timescaledb-2-postgresql-$pg
postgresql$pg-server
# We install as user postgres, so that needs write access to these.
chown $BUILDER_USERNAME $PG_BASE$pg/lib $PG_BASE$pg/share/extension
done;

for pg in $TSDB_PG_VERSIONS; do
yum -q -y install timescaledb-2-postgresql-$pg
done

gem install fpm -v $FPM_VERSION -N
Expand Down Expand Up @@ -198,12 +205,15 @@ EOF
apt-get -qq install \
postgresql-$pg \
postgresql-server-dev-$pg
# timescaledb packages Recommend toolkit, which we don't want here.
apt-get -qq install --no-install-recommends timescaledb-2-postgresql-$pg
# We install as user postgres, so that needs write access to these.
chown $BUILDER_USERNAME $PG_BASE$pg/lib /usr/share/postgresql/$pg/extension
done

for pg in $TSDB_PG_VERSIONS; do
# timescaledb packages Recommend toolkit, which we don't want here.
apt-get -qq install --no-install-recommends timescaledb-2-postgresql-$pg
done

# Ubuntu is the only system we want an image for that sticks an extra
# copy of the default PATH into PAM's /etc/environment and we su or sudo
# to $BUILDER_USERNAME thereby picking up that PATH and clobbering the
Expand Down
2 changes: 1 addition & 1 deletion tools/build
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ while [ $# -gt 0 ]; do
test-doc)
find_profile
require_pg_version
$nop cargo pgrx start --package timescaledb_toolkit $pg
$nop cargo pgrx start --package timescaledb_toolkit $pg || (cat /home/postgres/.pgrx/${pg_version}.log; false)
$nop cargo run --profile $profile -p sql-doctester -- \
-h localhost \
-p $pg_port \
Expand Down
8 changes: 5 additions & 3 deletions tools/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
# All our automation scripts read this, so at least we're not duplicating this
# information across all those.

PG_VERSIONS='12 13 14 15'
# TODO: remove this once TimescaleDB supports PostgreSQL 15: issue #648
TSDB_PG_VERSIONS='12 13 14'
PG_VERSIONS='12 13 14 15 16'
# TODO: extend this with 16 this once TimescaleDB supports PostgreSQL 16: issue #5752
TSDB_PG_VERSIONS='12 13 14 15'
# RHEL7 derivatives do not supply PostgreSQL 16 support
RHEL7_PG_VERSIONS='12 13 14 15'

CARGO_EDIT=0.11.2

Expand Down

0 comments on commit 1bc777e

Please sign in to comment.