From 32cacf7d35733c14174318f01c9eb1da4df2b7c5 Mon Sep 17 00:00:00 2001 From: PentiumB <5298.avgan.5298@gmail.com> Date: Thu, 16 Oct 2025 15:41:30 +0500 Subject: [PATCH] add FIX postgres REFRESH COLLATION VERSION --- docs/guides/useful-commands.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/guides/useful-commands.md b/docs/guides/useful-commands.md index def6138..237dde0 100644 --- a/docs/guides/useful-commands.md +++ b/docs/guides/useful-commands.md @@ -44,3 +44,18 @@ docker exec -it remnanode tail -n +1 -f /var/log/supervisor/xray.err.log ```bash cd /opt/remnanode && docker compose down && docker compose up -d && docker compose logs -f -t ``` + +### FIX postgres REFRESH COLLATION VERSION + +```bash +cd /opt/remnawave && docker compose exec remnawave-db psql -U $(grep '^POSTGRES_USER=' .env | cut -d '=' -f2) -d remnawave_db -c " +DO \$\$ +DECLARE + db_name text; +BEGIN + FOR db_name IN SELECT datname FROM pg_database WHERE datname NOT IN ('template0') LOOP + EXECUTE format('ALTER DATABASE %I REFRESH COLLATION VERSION', db_name); + END LOOP; +END \$\$; +" +```