Code

Opened 3 years ago

Closed 3 years ago

#16685 closed Uncategorized (duplicate)

Improvement of comment for database host setting

Reported by: chromano 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

Description

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 chromano 3 years ago.
An initial solution; just don't give a totally true information

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by chromano

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

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate of #9920.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.