Django supports PostgreSQL 9.0 and higher. It requires the use of Psycopg2 2.0.9 or higher.
Django needs the following parameters for its database connections:
client_encoding
:'UTF8'
,default_transaction_isolation
:'read committed'
by default, or the value set in the connection options (see here),timezone
:'UTC'
whenUSE_TZ
isTrue
, value ofTIME_ZONE
otherwise.
If these parameters already have the correct values, Django won't set them for every new connection, which improves performance slightly. You can configure them directly in postgresql.conf
or more conveniently per database user with ALTER ROLE
.
Django will work just fine without this optimization, but each new connection will do some additional queries to set these parameters.