-
-
Notifications
You must be signed in to change notification settings - Fork 131
add FIX postgres REFRESH COLLATION VERSION #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PentiumB
wants to merge
1
commit into
remnawave:main
Choose a base branch
from
PentiumB:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 " | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: The database name 'remnawave_db' is hardcoded. Consider using Prompt To Fix With AIThis 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 \$\$; | ||
| " | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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