You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Django with PostgreSQL on the same server, and so it connects using a UNIX socket and IDENT authentication - the only configuration required is the database name, there's no hostname or username. However, create_postgres_uri() requires that host is set:
The correct URI to generate is just postgresql:///dbname, which would be generated correctly without this check, and works fine with pg_dump. As far as I can tell, it would be enough to just remove this check, and if connection later fails, pg_dump's error can be reported instead. I'm happy to open a PR if that sounds like an acceptable solution.
The text was updated successfully, but these errors were encountered:
Bug Report
Describe the bug
I'm using Django with PostgreSQL on the same server, and so it connects using a UNIX socket and IDENT authentication - the only configuration required is the database name, there's no hostname or username. However,
create_postgres_uri()
requires thathost
is set:django-dbbackup/dbbackup/db/postgresql.py
Lines 10 to 13 in 790ec8b
The correct URI to generate is just
postgresql:///dbname
, which would be generated correctly without this check, and works fine withpg_dump
. As far as I can tell, it would be enough to just remove this check, and if connection later fails,pg_dump
's error can be reported instead. I'm happy to open a PR if that sounds like an acceptable solution.The text was updated successfully, but these errors were encountered: