Documentation for JIRA 4.4. Documentation for other versions of JIRA is available too. 
![]()
These instructions will help you connect JIRA to a PostgreSQL 8.2+ database.
Note: A version of these instructions specific to Linux and JIRA Standalone is available.
If you are Migrating JIRA to Another Server, create an export of your data as an XML backup. You will then be able to transfer data from your old database to your new database, as described in Switching databases.
On this page:
jiradbuser). jiradb) with Unicode collation.
CREATE DATABASE jiradb WITH ENCODING 'UNICODE';
$ createdb -E UNICODE jiradb
Skip this step if you are using JIRA Standalone distribution. JIRA Standalone includes the PostgreSQL JDBC driver.
lib/ directory of your application server.
There are two ways to configure your JIRA server to connect to your PostgreSQL database:
Please Note:
The JIRA Configuration Tool is only available with JIRA Standalone.
config.bat in the bin subdirectory of the JIRA Installation Directory.config.sh in the bin subdirectory of the JIRA Installation Directory. Please Note: You may need to set the
JAVA_HOME environment variable to run the JIRA Configuration Tool. See Installing Java for details.
To connect JIRA to PostgreSQL using the JIRA Configuration Tool:
dbconfig.xml file in your JIRA Home Directory.Congratulations — you have finished! Proceed to 'Next Steps' below.
dbconfig.xml file at the root of your JIRA Home Directory.Please Note:
Ensure that the <database-type/> element's content specifies your type of database, as shown below. If you forget to do this and you start JIRA, your database tables may be created incorrectly. Refer to our Incorrect database type specified documentation if this happens to you.
PostgreSQL 7.2 and later requires a schema to be specified in the <schema-name/> element. If your PostgreSQL database uses the default 'public' schema, this should be specified in the <schema-name/> element as shown below. Please ensure your database's schema name is lower-case as JIRA cannot work with PostgreSQL databases whose schema names contain upper-case characters.
dbconfig.xml file, escape any '&' characters by adding 'amp;' to the end of each one.
<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>postgres72</database-type>
<schema-name>public</schema-name>
<jdbc-datasource>
<url>jdbc:postgresql://dbserver:5432/jiradb</url>
<driver-class>org.postgresql.Driver</driver-class>
<username>jiradbuser</username>
<password>[enter db password]</password>
<pool-size>15</pool-size>
</jdbc-datasource>
</jira-database-config>
dbconfig.xml file (at the root of your JIRA Home Directory).
You should now have JIRA configured to connect to your PostgreSQL database.
Please see JIRA and PostgreSQL.