Skip to content
Open
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
1 change: 1 addition & 0 deletions Dockerfile-17
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ RUN sed -i \
# Remove timescaledb and plv8 references (not in pg17)
RUN sed -i 's/ timescaledb,//g;' "/etc/postgresql/postgresql.conf" && \
sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "/etc/postgresql/postgresql.conf" && \
sed -i 's/^#summarize_wal = off/summarize_wal = on/' "/etc/postgresql/postgresql.conf" && \
sed -i 's/ timescaledb,//g; s/ plv8,//g' "/etc/postgresql-custom/supautils.conf"

# Include schema migrations
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-orioledb-17
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ RUN sed -i \
# Remove timescaledb, plv8, postgis, pgrouting references (not available in orioledb build)
RUN sed -i 's/ timescaledb,//g;' "/etc/postgresql/postgresql.conf" && \
sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "/etc/postgresql/postgresql.conf" && \
sed -i 's/^#summarize_wal = off/summarize_wal = on/' "/etc/postgresql/postgresql.conf" && \
sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' "/etc/postgresql-custom/supautils.conf"

# OrioleDB configuration
Expand Down
2 changes: 2 additions & 0 deletions ansible/files/postgresql_config/postgresql.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ output_plugin_libraries = 'pgoutput, test_decoding, wal2json' # allowlist of log
#wal_writer_delay = 200ms # 1-10000 milliseconds
#wal_writer_flush_after = 1MB # measured in pages, 0 disables
#wal_skip_threshold = 2MB
#summarize_wal = off # PG17+ only; enabled at build time for 17 and up
#wal_summary_keep_time = '10d' # when to remove old summary files; 0 = never
Comment thread
brainrake marked this conversation as resolved.

#commit_delay = 0 # range 0-100000, in microseconds
#commit_siblings = 5 # range 1-1000
Expand Down
6 changes: 6 additions & 0 deletions ansible/tasks/stage2-setup-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
regexp: 'db_user_namespace\ =\ off'
replace: '#db_user_namespace\ =\ off'

- name: Enable summarize_wal in postgresql.conf if orioledb-17 or 17 build
ansible.builtin.replace:
path: '/etc/postgresql/postgresql.conf'
regexp: '^#summarize_wal = off'
replace: 'summarize_wal = on'

- name: Execute things when is_psql_oriole and stage2
when: stage2 and is_psql_oriole
become: true
Expand Down
6 changes: 6 additions & 0 deletions nix/tests/expected/z_17_wal_summarize.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT (SELECT setting FROM pg_settings WHERE name = 'summarize_wal') = 'on' AS summarize_wal_default_ok;
summarize_wal_default_ok
--------------------------
t
(1 row)

Comment thread
brainrake marked this conversation as resolved.
6 changes: 6 additions & 0 deletions nix/tests/expected/z_orioledb-17_wal_summarize.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT (SELECT setting FROM pg_settings WHERE name = 'summarize_wal') = 'on' AS summarize_wal_default_ok;
summarize_wal_default_ok
--------------------------
t
(1 row)

1 change: 1 addition & 0 deletions nix/tests/sql/z_17_wal_summarize.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT (SELECT setting FROM pg_settings WHERE name = 'summarize_wal') = 'on' AS summarize_wal_default_ok;
Comment thread
brainrake marked this conversation as resolved.
1 change: 1 addition & 0 deletions nix/tests/sql/z_orioledb-17_wal_summarize.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT (SELECT setting FROM pg_settings WHERE name = 'summarize_wal') = 'on' AS summarize_wal_default_ok;
5 changes: 5 additions & 0 deletions nix/tools/run-server.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ session_preload_libraries = 'supautils'" \
-e "s|include_dir = '/etc/postgresql-custom/conf.d'|include_dir = '$DATDIR/conf.d'|" \
"$PSQL_CONF_FILE" > "$DATDIR/postgresql.conf"

# summarize_wal is PostgreSQL 17+; PG15 refuses to start on an unknown GUC
if [ "$VERSION" != "15" ]; then
perl -pi -e 's/^#summarize_wal = off/summarize_wal = on/' "$DATDIR/postgresql.conf"
fi

# Function to configure OrioleDB specific settings
orioledb_config_items() {
if [[ "$1" = "orioledb-17" && "$CURRENT_SYSTEM" != "aarch64-darwin" ]]; then
Expand Down
Loading