postgresql-init-dev-db: Work around PGroonga WAL issue.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-05-15 21:13:42 -07:00
committed by Tim Abbott
parent 83c0ed2a9d
commit 480a2e2d64

View File

@@ -108,6 +108,15 @@ EOF
"${ROOT_POSTGRES[@]}" -v ON_ERROR_STOP=1 -e "$DBNAME_BASE" <<EOF
CREATE EXTENSION pgroonga;
-- Work around https://github.com/pgroonga/pgroonga/issues/335
SELECT unnest(
CASE WHEN current_setting('server_version_num')::integer >= 150000
AND current_setting('pgroonga.enable_wal', TRUE) = 'on' IS NOT TRUE THEN
ARRAY['ALTER SYSTEM SET pgroonga.enable_wal = ''on''', 'SELECT pg_reload_conf()']
END
) \gexec
GRANT USAGE ON SCHEMA pgroonga TO $USERNAME;
EOF