Skip to content

Commit deed353

Browse files
committed
Update pg_textsearch to v0.6.0 and add to shared_preload_libraries
pg_textsearch v0.6.0 requires being added to shared_preload_libraries. This adds it for pg17+ in the Dockerfile postgresql.conf.sample, the CI smoketest, and the Spilo/Patroni configuration.
1 parent ed77c09 commit deed353

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ RUN for file in $(find /usr/share/postgresql -name 'postgresql.conf.sample'); do
308308
&& echo "listen_addresses = '*'" >> $file; \
309309
done
310310

311+
# pg_textsearch requires shared_preload_libraries (pg17+ only)
312+
RUN for file in $(find /usr/share/postgresql -name 'postgresql.conf.sample'); do \
313+
pgver="$(basename "$(dirname "$file")")"; \
314+
if [ "$pgver" -ge 17 ] 2>/dev/null; then \
315+
sed -r -i "s/(shared_preload_libraries\s*=\s*'[^']*)/\1,pg_textsearch/" "$file"; \
316+
fi; \
317+
done
318+
311319
RUN chown -R postgres:postgres /usr/local/cargo
312320

313321
# required to install dbgsym packages

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PGVECTO_RS?=0.4.0
2121
VECTORCHORD?=0.5.3
2222
TIMESCALEDB_VERSIONS?=all
2323
TOOLKIT_VERSIONS?=all
24-
PG_TEXTSEARCH_VERSION?=v0.5.1
24+
PG_TEXTSEARCH_VERSION?=v0.6.0
2525
PGBOUNCER_EXPORTER_VERSION?=0.9.0
2626
PGBACKREST_EXPORTER_VERSION?=0.18.0
2727

cicd/smoketest.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ echo
1414
initdb
1515

1616
SHARED_PRELOAD_LIBRARIES="timescaledb"
17+
if [ "${PG_MAJOR}" -ge 17 ] 2>/dev/null; then
18+
SHARED_PRELOAD_LIBRARIES="${SHARED_PRELOAD_LIBRARIES},pg_textsearch"
19+
fi
1720
EXTENSION_DIR="$(pg_config --sharedir)/extension"
1821

1922
echo "shared_preload_libraries='${SHARED_PRELOAD_LIBRARIES}'" >>"${PGDATA}/postgresql.conf"

scripts/configure_spilo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
'pg_cron': (9.5, 11, True, False),
5555
'pg_stat_kcache': (9.4, 11, True, False),
5656
'pg_partman': (9.4, 11, False, True),
57-
'set_user': (9.4, 11, True, False)
57+
'set_user': (9.4, 11, True, False),
58+
'pg_textsearch': (17, 99, True, True)
5859
}
5960

6061
AUTO_ENABLE_WALG_RESTORE = ('WAL_S3_BUCKET', 'WALE_S3_PREFIX', 'WALG_S3_PREFIX')

0 commit comments

Comments
 (0)