From f71aa644b1aedba32c83bad76bc512bfe52e6c75 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 25 Feb 2020 11:17:51 +0100 Subject: [PATCH 1/2] Add :unnamed option to default database configuration --- config/config.exs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.exs b/config/config.exs index 9d1e29c0d..2b7a761ea 100644 --- a/config/config.exs +++ b/config/config.exs @@ -621,7 +621,9 @@ config :pleroma, :modules, runtime_dir: "instance/modules" config :pleroma, configurable_from_database: false -config :pleroma, Pleroma.Repo, parameters: [gin_fuzzy_search_limit: "500"] +config :pleroma, Pleroma.Repo, + parameters: [gin_fuzzy_search_limit: "500"], + prepare: :unnamed # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. From e4804137b3b5d269515bc40b9f173a1fc8931014 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 25 Feb 2020 11:51:01 +0100 Subject: [PATCH 2/2] Document database default changes --- CHANGELOG.md | 1 + docs/installation/otp_en.md | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08bb7e1c7..ea72de896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Rate limiter is now disabled for localhost/socket (unless remoteip plug is enabled) - Logger: default log level changed from `warn` to `info`. - Config mix task `migrate_to_db` truncates `config` table before migrating the config file. +- Default to `prepare: :unnamed` in the database configuration.
API Changes diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md index aab5197a2..32551f7b6 100644 --- a/docs/installation/otp_en.md +++ b/docs/installation/otp_en.md @@ -73,6 +73,15 @@ rc-service postgresql restart systemctl restart postgresql ``` +If you are using PostgreSQL 12 or higher, add this to your Ecto database configuration + +```elixir +prepare: :named, +parameters: [ + plan_cache_mode: "force_custom_plan" +] +``` + ### Installing Pleroma ```sh # Create a Pleroma user