Opened 22 months ago

Closed 22 months ago

Last modified 22 months 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 22 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization
  • Version changed from 1.5 to master

comment:2 Changed 22 months ago by rm_

  • Owner changed from nobody to rm_
  • Status changed from new to assigned
  • Triage Stage changed from Accepted to Unreviewed

comment:3 Changed 22 months ago by rm_

  • Has patch set

comment:4 Changed 22 months ago by rm_

  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 22 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 1e39982b6ef1fd10e53392f4cb52bea3805d186f:

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

comment:6 Changed 22 months 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 22 months 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