From 751990e8f1680da5cb5f44cc738b1ce340211407 Mon Sep 17 00:00:00 2001 From: Sam Hadow Date: Sun, 2 Nov 2025 21:07:02 +0100 Subject: [PATCH] appearance --- .../2025-11-02-nextcloud-collation-version-mismatch.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_posts/2025-11-02-nextcloud-collation-version-mismatch.md b/_posts/2025-11-02-nextcloud-collation-version-mismatch.md index cdc3b21..1c8ec61 100644 --- a/_posts/2025-11-02-nextcloud-collation-version-mismatch.md +++ b/_posts/2025-11-02-nextcloud-collation-version-mismatch.md @@ -20,10 +20,10 @@ This missmatch can affect: + Indexes on text columns + ORDER BY and equality comparisons (text, varchar) -### fix +## fix You can follow this procedure to fix it: -1. Enable maintenance mode +### 1: Enable maintenance mode The database must not be accessed during the procedure. ``` @@ -31,7 +31,7 @@ podman exec -u www-data nextcloud-app php occ maintenance:mode --on ``` Replace nextcloud-app with the name of your container. And use docker instead of podman if applicable. -2. Rebuild the database indexes and refresh the collation version +### 2: Rebuild the database indexes and refresh the collation version ``` podman exec -it nextcloud-db bash psql -U nextcloud nextcloud @@ -44,11 +44,11 @@ Log in to your nextcloud database and then reindex it, depending on the size of The second command (`ALTER DATABASE ... REFRESH COLLATION VERSION`) just marks the collation version as current in PostgreSQL metadata and removes the warning. -3. Disable maintenance mode +### 3: Disable maintenance mode ``` podman exec -u www-data nextcloud-app php occ maintenance:mode --off ``` -### note +## note I then found this [script](https://gist.github.com/troykelly/616df024050dd50744dde4a9579e152e) on github to automate this with any PostgreSQL server but didn't test it yet. Still, it's probably more convenient than doing all the steps described above manually every time.