Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/developer/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
```
Expand Down
4 changes: 2 additions & 2 deletions misc/images/materialized-base/postgresql.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion src/materialized/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
6 changes: 3 additions & 3 deletions src/materialized/ci/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ 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 &
PGPID=$!

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

Expand Down