From 928fb6d2e60f2db6eee8d46d3b69067f6f63eeb2 Mon Sep 17 00:00:00 2001 From: Phantasm Date: Sat, 13 Sep 2025 17:58:15 +0200 Subject: [PATCH 1/3] docs rum: Remove warning about lower PostgreSQL now unsupported versions --- docs/configuration/cheatsheet.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index 07414f69a..16ebf670f 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -904,9 +904,6 @@ config :logger, :console, ### RUM indexing for full text search -!!! warning - It is recommended to use PostgreSQL v11 or newer. We have seen some minor issues with lower PostgreSQL versions. - * `rum_enabled`: If RUM indexes should be used. Defaults to `false`. RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. While they may eventually be mainlined, for now they have to be installed as a PostgreSQL extension from https://github.com/postgrespro/rum. From 846e0ae2cd58a055a59b7e9c8f14d624dae9c8eb Mon Sep 17 00:00:00 2001 From: Phantasm Date: Sat, 13 Sep 2025 18:05:12 +0200 Subject: [PATCH 2/3] docs rum: Update idx size, add command for OTP install, recommend vacuum --- changelog.d/docs-rum-otp-vacuum.change | 1 + docs/configuration/cheatsheet.md | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 changelog.d/docs-rum-otp-vacuum.change diff --git a/changelog.d/docs-rum-otp-vacuum.change b/changelog.d/docs-rum-otp-vacuum.change new file mode 100644 index 000000000..6d8d43dd0 --- /dev/null +++ b/changelog.d/docs-rum-otp-vacuum.change @@ -0,0 +1 @@ +Docs RUM index: Add OTP install command, update index size expectation and recommend VACUUM FULL diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index 16ebf670f..39796d5a1 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -906,16 +906,29 @@ config :logger, :console, * `rum_enabled`: If RUM indexes should be used. Defaults to `false`. -RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. While they may eventually be mainlined, for now they have to be installed as a PostgreSQL extension from https://github.com/postgrespro/rum. +RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. While they may eventually be mainlined, for now they have to be installed as a PostgreSQL extension from [https://github.com/postgrespro/rum](https://github.com/postgrespro/rum). -Their advantage over the standard GIN indexes is that they allow efficient ordering of search results by timestamp, which makes search queries a lot faster on larger servers, by one or two orders of magnitude. They take up around 3 times as much space as GIN indexes. +Their advantage over the standard GIN indexes is that they allow efficient ordering of search results by timestamp, which makes search queries a lot faster on larger servers, by one or two orders of magnitude. They take up around 3-4 times as much space as GIN indexes. To enable them, both the `rum_enabled` flag has to be set and the following special migration has to be run: -`mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/` + * Source install: + - Stop Pleroma + - `mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/` + * OTP install: + - Stop Pleroma + - `pleroma_ctl migrate --migrations-path /lib/pleroma-/priv/repo/optional_migrations/rum_indexing/` This will probably take a long time. +!!! note + It is recommended to `VACUUM FULL` the objects table after the migration has completed, to do that run: + ``` + # sudo -Hu postgres vacuumdb --full --analyze -t objects + ``` + +Now you can start Pleroma back up. + ## Alternative client protocols ### BBS / SSH access From d1b01ae707021ecfe253d892d95165e2362d8bce Mon Sep 17 00:00:00 2001 From: Phantasm Date: Thu, 23 Oct 2025 21:14:31 +0200 Subject: [PATCH 3/3] docs rum: use relative path for optional migrations for OTP installs --- docs/configuration/cheatsheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index 39796d5a1..54dd4a5f0 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -917,7 +917,7 @@ To enable them, both the `rum_enabled` flag has to be set and the following spec - `mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/` * OTP install: - Stop Pleroma - - `pleroma_ctl migrate --migrations-path /lib/pleroma-/priv/repo/optional_migrations/rum_indexing/` + - `pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/` This will probably take a long time.