Skip to content

Commit 951abf9

Browse files
committed
PG-2398 Enable support for PostgreSQL 16 in our CI
Most of the work doing this was related to making everything build without injection points as injection points were first added in PostgreSQL 17.
1 parent b660539 commit 951abf9

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

.github/workflows/matrix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
pg_version: [17, 18]
19+
pg_version: [16, 17, 18]
2020
os: [ubuntu-24.04]
2121
compiler: [gcc, clang]
2222
build_type: [debugoptimized]
@@ -51,7 +51,7 @@ jobs:
5151
strategy:
5252
fail-fast: false
5353
matrix:
54-
pg_version: [17, 18]
54+
pg_version: [16, 17, 18]
5555
os: [ubuntu-24.04-arm]
5656
compiler: [gcc, clang]
5757
build_type: [debugoptimized]

ci_scripts/build-and-install-psp.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,29 @@ ARGS=
77
SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"
88
INSTALL_DIR="$SCRIPT_DIR/../../pginst"
99
PSP_DIR="$SCRIPT_DIR/../../postgres"
10+
PG_CONFIG="$INSTALL_DIR/bin/pg_config"
11+
12+
PG_VERSION=$("$PG_CONFIG" --version | sed -n 's/PostgreSQL \([0-9]*\).*/\1/p')
1013

1114
INSTALL_INJECTION_POINTS=0
1215

1316
case "$1" in
1417
debug)
1518
echo "Building with debug option"
16-
ARGS+=" --enable-cassert --enable-injection-points"
19+
ARGS+=" --enable-cassert"
1720
INSTALL_INJECTION_POINTS=1
1821
;;
1922

2023
debugoptimized)
2124
echo "Building with debugoptimized option"
2225
export CFLAGS="-O2"
23-
ARGS+=" --enable-cassert --enable-injection-points"
26+
ARGS+=" --enable-cassert"
2427
INSTALL_INJECTION_POINTS=1
2528
;;
2629

2730
coverage)
2831
echo "Building with coverage option"
29-
ARGS+=" --enable-injection-points --enable-coverage"
32+
ARGS+=" --enable-coverage"
3033
INSTALL_INJECTION_POINTS=1
3134
;;
3235

@@ -42,8 +45,18 @@ case "$1" in
4245
;;
4346
esac
4447

48+
if [ "$PG_VERSION" -lt 17 ]; then
49+
INSTALL_INJECTION_POINTS=0
50+
fi
51+
52+
if [ "$INSTALL_INJECTION_POINTS" = 1 ]; then
53+
ARGS+=" --enable-injection-points"
54+
fi
55+
4556
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
46-
ARGS+=" --with-liburing"
57+
if [ "$PG_VERSION" -ge 17 ]; then
58+
ARGS+=" --with-liburing"
59+
fi
4760
NCPU=$(nproc)
4861
elif [[ "$OSTYPE" == "darwin"* ]]; then
4962
NCPU=$(sysctl -n hw.ncpu)

0 commit comments

Comments
 (0)