Skip to content

Commit eb8cf90

Browse files
utkarash2991mmlb
authored andcommitted
fix: allowlist wal2json in output_plugin_libraries + finish version strings (15.19/17.11)
PG 15.19/17.11 introduce output_plugin_libraries (CVE-2026-6471) defaulting to pgoutput+test_decoding only, which breaks wal2json slots (Realtime, CI wal2json tests). Allowlist wal2json in the shared config; comment it out for orioledb builds (17.9 base, GUC absent, unknown parameter is fatal at startup). Also bump schema dump headers left at 15.14/17.6.
1 parent bb5a9f8 commit eb8cf90

6 files changed

Lines changed: 20 additions & 4 deletions

File tree

ansible/files/postgresql_config/postgresql.conf.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ shared_buffers = 128MB # min 128kB
204204

205205
wal_level = logical # minimal, replica, or logical
206206
# (change requires restart)
207+
output_plugin_libraries = 'pgoutput, test_decoding, wal2json' # allowlist of logical decoding
208+
# output plugins (PG 15.19 / 17.11+); wal2json is
209+
# required by Realtime and shipped in the image
207210
#fsync = on # flush data to disk for crash safety
208211
# (turning this off can cause
209212
# unrecoverable data corruption)

ansible/tasks/stage2-setup-postgres.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
when: stage2 and is_psql_oriole
3737
become: true
3838
block:
39+
- name: Comment out output_plugin_libraries if orioledb build (GUC does not exist before PG 17.11)
40+
ansible.builtin.replace:
41+
path: '/etc/postgresql/postgresql.conf'
42+
regexp: '^output_plugin_libraries'
43+
replace: '#output_plugin_libraries'
44+
3945
- name: Append orioledb to shared_preload_libraries append within closing quote
4046
ansible.builtin.replace:
4147
path: '/etc/postgresql/postgresql.conf'

migrations/schema-15.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
\restrict SupabaseTestDumpKey123
66

7-
-- Dumped from database version 15.14
8-
-- Dumped by pg_dump version 15.14
7+
-- Dumped from database version 15.19
8+
-- Dumped by pg_dump version 15.19
99

1010
SET statement_timeout = 0;
1111
SET lock_timeout = 0;

migrations/schema-17.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
\restrict SupabaseTestDumpKey123
66

7-
-- Dumped from database version 17.6
8-
-- Dumped by pg_dump version 17.6
7+
-- Dumped from database version 17.11
8+
-- Dumped by pg_dump version 17.11
99

1010
SET statement_timeout = 0;
1111
SET lock_timeout = 0;

nix/checks.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,10 @@
410410
# Add orioledb to shared_preload_libraries
411411
perl -pi -e "s/(shared_preload_libraries = ')/\$1orioledb, /" "$PGTAP_CLUSTER/postgresql.conf"
412412
log info "OrioleDB added to shared_preload_libraries"
413+
else
414+
# PG 15.19 / 17.11+: allowlist wal2json for logical decoding (GUC does not
415+
# exist on the orioledb 17.9 base, hence the else branch)
416+
echo "output_plugin_libraries = 'pgoutput, test_decoding, wal2json'" >> "$PGTAP_CLUSTER"/postgresql.conf
413417
fi
414418
415419
# Check if postgresql.conf exists

nix/ext/tests/lib.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ let
115115
${
116116
if majorVersion == "orioledb-17" then
117117
''
118+
# OrioleDB: comment out output_plugin_libraries (GUC does not exist before PG 17.11;
119+
# orioledb line is on a 17.9 base and would fail to start on an unknown parameter)
120+
sed -i 's/^output_plugin_libraries/#output_plugin_libraries/' $out/postgresql.conf
118121
# OrioleDB: also remove pgjwt from supautils privileged_extensions
119122
sed -i 's/ pgjwt,//g;' $out/supautils.conf
120123
# OrioleDB: append orioledb to shared_preload_libraries

0 commit comments

Comments
 (0)