Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to fix the collation of a Postgres JIRA database

DerivcoITServer October 3, 2017

Hi,

I have been following this article on how to fix my postgres database collation issue.

https://confluence.atlassian.com/jirakb/how-to-fix-the-collation-of-a-postgres-jira-database-776657961.html

  1. Create an XML backup.
  2. Create a new database as per our guidelines. Please refer to Setting up a PostgreSQL Database for JIRA if you are using Linux.

  3. Adjust your JIRA database connection to point to the new database. 
  4. Restore your data to the new database using Restoring Data.
  5. Start JIRA and ensure that everything is working correctly
  6. You may want to run Database Integrity Checker to verify you data.

This requires you to do an xml backup and restore.  Is there no other way possibly creating a new database and loading the data using native database tools such as psql ?

Regards,

Avinash

3 answers

0 votes
Jira Median
Contributor
December 15, 2017

Hi,

Is it possible just to change the collation of the jira database without create a new database ? I want to say changing just the collation settings of the jirad database.

0 votes
DerivcoITServer October 4, 2017

Thanks Nic. How will I know if the restoration will not change the new collation back?

 Name | Owner | Encoding | Collate | Ctype | Access privileges
-------------------------+------------+----------+-------------+-------------+-----------------------
jiradb| jira| UTF8 | en_US.UTF-8 | en_US.UTF-8 |
jiraNew| jira| UTF8 | C | C |

 

Here is what I am doing:

- create jiraNew database with new collation

- restore a backup of jiradb to jiraNew using , psql jiraNew < backupfile

 

Are these collations (en_US.UTF-8 and C) very different?

DerivcoITServer October 4, 2017

jiradb was the old database.

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2017

Yes, you can use the database tools to do this.  As long as restoration of data will not change the new collation back.

However, if the collations are very different, you may find some of your data changes to match.  The xml export/import is agnostic of that.

kns_jeinhorn
Contributor
February 12, 2025

Nic,

Can you explain what constitutes "very different" collations?

I recently discovered that our Jira Dev and Jira Test environments are using Collate: C and Ctype: C but our Production Jira environment is using Collate: en_US.UTF-8 and Ctype: en_US.UTF-8.  Are these "very different"?

Thanks!

 

Suggest an answer

Log in or Sign up to answer