diff --git a/Dockerfile b/Dockerfile index 62ec66c8..cbf663f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -308,6 +308,14 @@ RUN for file in $(find /usr/share/postgresql -name 'postgresql.conf.sample'); do && echo "listen_addresses = '*'" >> $file; \ done +# pg_textsearch requires shared_preload_libraries (pg17+ only) +RUN for file in $(find /usr/share/postgresql -name 'postgresql.conf.sample'); do \ + pgver="$(basename "$(dirname "$file")")"; \ + if [ "$pgver" -ge 17 ] 2>/dev/null; then \ + sed -r -i "s/(shared_preload_libraries\s*=\s*'[^']*)/\1,pg_textsearch/" "$file"; \ + fi; \ + done + RUN chown -R postgres:postgres /usr/local/cargo # required to install dbgsym packages diff --git a/Makefile b/Makefile index 144cf82b..f0009578 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ PGVECTO_RS?=0.4.0 VECTORCHORD?=0.5.3 TIMESCALEDB_VERSIONS?=all TOOLKIT_VERSIONS?=all -PG_TEXTSEARCH_VERSION?=v0.5.1 +PG_TEXTSEARCH_VERSION?=v0.6.0 PGBOUNCER_EXPORTER_VERSION?=0.9.0 PGBACKREST_EXPORTER_VERSION?=0.18.0 diff --git a/cicd/smoketest.sh b/cicd/smoketest.sh index 809d7fdc..c3581075 100755 --- a/cicd/smoketest.sh +++ b/cicd/smoketest.sh @@ -14,6 +14,9 @@ echo initdb SHARED_PRELOAD_LIBRARIES="timescaledb" +if [ "${PG_MAJOR}" -ge 17 ] 2>/dev/null; then + SHARED_PRELOAD_LIBRARIES="${SHARED_PRELOAD_LIBRARIES},pg_textsearch" +fi EXTENSION_DIR="$(pg_config --sharedir)/extension" echo "shared_preload_libraries='${SHARED_PRELOAD_LIBRARIES}'" >>"${PGDATA}/postgresql.conf" diff --git a/scripts/configure_spilo.py b/scripts/configure_spilo.py index 82a3aaa4..ad703106 100644 --- a/scripts/configure_spilo.py +++ b/scripts/configure_spilo.py @@ -54,7 +54,8 @@ 'pg_cron': (9.5, 11, True, False), 'pg_stat_kcache': (9.4, 11, True, False), 'pg_partman': (9.4, 11, False, True), - 'set_user': (9.4, 11, True, False) + 'set_user': (9.4, 11, True, False), + 'pg_textsearch': (17, 99, True, True) } AUTO_ENABLE_WALG_RESTORE = ('WAL_S3_BUCKET', 'WALE_S3_PREFIX', 'WALG_S3_PREFIX')