From 13c7ff7e63bdc3ace34d4088e0c1720979b9e1ff Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Sat, 17 Jan 2026 06:21:46 +0000 Subject: [PATCH] emulator: Bump included postgresql version to 18 --- doc/developer/guide.md | 2 +- misc/images/materialized-base/postgresql.conf | 4 ++-- src/materialized/ci/Dockerfile | 2 +- src/materialized/ci/entrypoint.sh | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/developer/guide.md b/doc/developer/guide.md index 2e7181c66aebf..0a93d2b2fb5b2 100644 --- a/doc/developer/guide.md +++ b/doc/developer/guide.md @@ -93,7 +93,7 @@ all set. If you are just testing Materialize locally and don't care about data loss you can run environmentd with `eatmydata environmentd`, which will disable fsync calls. -Similarly postgres as the metadata store can be instructed to eat your data using `echo LD_PRELOAD=libeatmydata.so > /etc/postgresql/17/main/environment`, and then restarting it. +Similarly postgres as the metadata store can be instructed to eat your data using `echo LD_PRELOAD=libeatmydata.so > /etc/postgresql/18/main/environment`, and then restarting it. On my Linux system without `eatmydata` for both Materialize and Postgres, running with `bin/environmentd --reset --optimized --no-default-features --postgres=postgres://deen@%2Fvar%2Frun%2Fpostgresql`: ``` diff --git a/misc/images/materialized-base/postgresql.conf b/misc/images/materialized-base/postgresql.conf index e65c8113cb9f3..4a191faff8513 100644 --- a/misc/images/materialized-base/postgresql.conf +++ b/misc/images/materialized-base/postgresql.conf @@ -10,7 +10,7 @@ data_directory = '/mzdata/postgres' hba_file = '/etc/postgresql/pg_hba.conf' ident_file = '/mzdata/postgres/pg_ident.conf' -external_pid_file = '/var/run/postgresql/17-main.pid' +external_pid_file = '/var/run/postgresql/18-main.pid' listen_addresses = '*' port = 26257 max_connections = 5000 @@ -22,7 +22,7 @@ max_wal_size = 1GB min_wal_size = 80MB log_line_prefix = '%m [%p] %q%u@%d ' log_timezone = UTC -cluster_name = '17/main' +cluster_name = '18/main' datestyle = 'iso, mdy' timezone = UTC lc_messages = 'C.UTF-8' diff --git a/src/materialized/ci/Dockerfile b/src/materialized/ci/Dockerfile index b219d7d52de9b..50d2c1d44b693 100644 --- a/src/materialized/ci/Dockerfile +++ b/src/materialized/ci/Dockerfile @@ -18,6 +18,6 @@ RUN ln -s /usr/local/bin/materialized /usr/local/bin/environmentd \ USER materialize -RUN /usr/lib/postgresql/17/bin/initdb -D /mzdata/postgres -U root --auth-local=trust +RUN /usr/lib/postgresql/18/bin/initdb -D /mzdata/postgres -U root --auth-local=trust ENTRYPOINT ["tini", "--", "entrypoint.sh"] diff --git a/src/materialized/ci/entrypoint.sh b/src/materialized/ci/entrypoint.sh index d28c611f00af1..7bccc3ce36f0f 100755 --- a/src/materialized/ci/entrypoint.sh +++ b/src/materialized/ci/entrypoint.sh @@ -63,12 +63,12 @@ if ! is_truthy "${MZ_NO_BUILTIN_POSTGRES:-0}"; then # Should exist already, but /mzdata might be overwritten with a fresh volume if [ ! -f $PGDATA/PG_VERSION ]; then mkdir -p $PGDATA - /usr/lib/postgresql/17/bin/initdb -D $PGDATA -U $PGUSER --auth-local=trust + /usr/lib/postgresql/18/bin/initdb -D $PGDATA -U $PGUSER --auth-local=trust fi # Might have been killed hard rm -f $PGDATA/postmaster.pid - /usr/lib/postgresql/17/bin/postgres -D $PGDATA \ + /usr/lib/postgresql/18/bin/postgres -D $PGDATA \ -c listen_addresses='*' \ -c unix_socket_directories=/var/run/postgresql \ -c config_file=/etc/postgresql/postgresql.conf > /mzdata/postgres/postgres.log 2>&1 & @@ -76,7 +76,7 @@ if ! is_truthy "${MZ_NO_BUILTIN_POSTGRES:-0}"; then trap 'kill -INT $PGPID; wait $PGPID' SIGTERM SIGINT - until /usr/lib/postgresql/17/bin/pg_isready > /dev/null 2>&1; do + until /usr/lib/postgresql/18/bin/pg_isready > /dev/null 2>&1; do sleep 0.01 done