Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/guides/useful-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: This section is placed under 'Remnawave Node' but it's actually a database operation that should be under 'Remnawave Panel' section

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/guides/useful-commands.md
Line: 48:48

Comment:
**style:** This section is placed under 'Remnawave Node' but it's actually a database operation that should be under 'Remnawave Panel' section

How can I resolve this? If you propose a fix, please make it concise.


```bash
cd /opt/remnawave && docker compose exec remnawave-db psql -U $(grep '^POSTGRES_USER=' .env | cut -d '=' -f2) -d remnawave_db -c "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: The database name 'remnawave_db' is hardcoded. Consider using $(grep '^POSTGRES_DB=' .env | cut -d '=' -f2) to match the actual database name from the environment file

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/guides/useful-commands.md
Line: 51:51

Comment:
**logic:** The database name 'remnawave_db' is hardcoded. Consider using `$(grep '^POSTGRES_DB=' .env | cut -d '=' -f2)` to match the actual database name from the environment file

How can I resolve this? If you propose a fix, please make it concise.

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 \$\$;
"
```