Skip to content
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

PostgreSQL connector should default to "localhost" if no HOST is provided instead of erroring. #520

Closed
bckohan opened this issue Jul 18, 2024 · 1 comment · Fixed by #521
Labels
bug Bugs that need to get fixed.

Comments

@bckohan
Copy link
Contributor

bckohan commented Jul 18, 2024

Current Situation

If HOST key is not present in the DATABASES setting dbbackup will error out.

Proposed Actions

It is valid Django that if HOST is not present it is assumed to be localhost.

I propose that if HOST is not present it is assumed to be localhost as the Django docs suggest.

System Information

all systems are affected.

@bckohan bckohan added the bug Bugs that need to get fixed. label Jul 18, 2024
bckohan added a commit to bckohan/django-dbbackup that referenced this issue Jul 18, 2024
bckohan added a commit to bckohan/django-dbbackup that referenced this issue Jul 19, 2024
bckohan added a commit to bckohan/django-dbbackup that referenced this issue Jul 19, 2024
@Archmonger Archmonger linked a pull request Jul 19, 2024 that will close this issue
4 tasks
@sur5r
Copy link
Contributor

sur5r commented Dec 19, 2024

Actually, the fix is wrong. The Django docs explicetely state that empty host string means unix domain socket connection for postgres. This also reported in #490. So the fallback for unset HOST should be "" and not "localhost".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs that need to get fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants