Opened 12 years ago

Closed 12 years ago

#16685 closed Uncategorized (duplicate)

Improvement of comment for database host setting

Reported by: Henrique Romano Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Currently, the database host setting contains the following comment:

'HOST': '', # Set to empty string for localhost. Not used with sqlite3.

However, it isn't true for postgres. An empty string is different from a "localhost" string in that the first one will make postgres uses a unix domain socket rather than a TCP connection.

For default postgres configuration, this difference is the reason of an authentication problem. When using a domain socket, postgres uses "ident" as the authentication mechanism. By using ident authentication, users will only be able to authenticated in the DB if their OS username is the same as the DB username (which isn't necessarily true for a production environment, for example, where apache runs as "www-data" and the DB is owned by the "postgres" or the project owner's username).

I think that a possible solution would be the improvement of this comment in order to let the user know about this problem or at least remove the part where it says that an empty is the same as "localhost".

Attachments (1)

django-16685.diff (789 bytes) - added by Henrique Romano 12 years ago.
An initial solution; just don't give a totally true information

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by Henrique Romano

Attachment: django-16685.diff added

An initial solution; just don't give a totally true information

comment:1 Changed 12 years ago by Aymeric Augustin

Resolution: duplicate
Status: newclosed

This is a duplicate of #9920.

Note: See TracTickets for help on using tickets.
Back to Top