Skip to content

Commit daec7b7

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 daec7b7

2 files changed

Lines changed: 18 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: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,27 @@ SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)"
88
INSTALL_DIR="$SCRIPT_DIR/../../pginst"
99
PSP_DIR="$SCRIPT_DIR/../../postgres"
1010

11+
PG_VERSION=$(sed -n "s/PACKAGE_VERSION='\\([0-9]*\\).*/\1/p" "$PSP_DIR/configure")
12+
1113
INSTALL_INJECTION_POINTS=0
1214

1315
case "$1" in
1416
debug)
1517
echo "Building with debug option"
16-
ARGS+=" --enable-cassert --enable-injection-points"
18+
ARGS+=" --enable-cassert"
1719
INSTALL_INJECTION_POINTS=1
1820
;;
1921

2022
debugoptimized)
2123
echo "Building with debugoptimized option"
2224
export CFLAGS="-O2"
23-
ARGS+=" --enable-cassert --enable-injection-points"
25+
ARGS+=" --enable-cassert"
2426
INSTALL_INJECTION_POINTS=1
2527
;;
2628

2729
coverage)
2830
echo "Building with coverage option"
29-
ARGS+=" --enable-injection-points --enable-coverage"
31+
ARGS+=" --enable-coverage"
3032
INSTALL_INJECTION_POINTS=1
3133
;;
3234

@@ -42,8 +44,18 @@ case "$1" in
4244
;;
4345
esac
4446

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

0 commit comments

Comments
 (0)