Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21296 closed Cleanup/optimization (fixed)

settings: adding a the unix socket dir path in DATABASES HOST works for postgres too

Reported by: rm_ Owned by: rm_
Component: Documentation Version: master
Severity: Normal Keywords: postgres settings host
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The host documentation [1] doesn't mention that passing a unix socket dir (unix_socket_directory in postgresql.conf) as value of HOST will have postgresql use that instead of default /var/run/postgresql/.s.PGSQL.5432 . Since there is an explicit example for MySQL i thought it wasn't supported (i've tried it though :). Tested with django 1.5.4 / postgresql_psycopg2

There are also a couple of stack overflow questions related to this:

http://stackoverflow.com/questions/12317562/trying-to-set-django-and-postgresql-on-heroku
http://stackoverflow.com/questions/10829464/postgresql-and-django-unix-domain-socket

[1] https://docs.djangoproject.com/en/dev/ref/settings/#host

Change History (7)

comment:1 Changed 3 years ago by Tim Graham

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization
Version: 1.5master

comment:2 Changed 3 years ago by rm_

Owner: changed from nobody to rm_
Status: newassigned
Triage Stage: AcceptedUnreviewed

comment:3 Changed 3 years ago by rm_

Has patch: set

comment:4 Changed 3 years ago by rm_

Triage Stage: UnreviewedAccepted

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 1e39982b6ef1fd10e53392f4cb52bea3805d186f:

Fixed #21296 -- Added docs for PostgreSQL and unix domains sockets.

comment:6 Changed 3 years ago by Tim Graham <timograham@…>

In 15a6667a7040739a74c9bc7c83ee9435f517b284:

[1.6.x] Fixed #21296 -- Added docs for PostgreSQL and unix domains sockets.

Backport of 1e39982b6e from master

comment:7 Changed 3 years ago by Tim Graham <timograham@…>

In 045d192222f531948313bde8d43746dde33b522d:

[1.5.x] Fixed #21296 -- Added docs for PostgreSQL and unix domains sockets.

Backport of 1e39982b6e from master

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