Database Collation health check fails with PostgreSQL in Jira server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

ヘルス チェックについて

More about this Health Check.

結果の確認 

アイコン

結果

意味

The database collation '<collation>' and table collation '<collation>' are supported by JIRA. A limited number of circumstances could cause unexpected results.データベースがサポート対象の照合で構成されています。
The database collation '<collation>' and table collation '<collation>' are not supported by JIRA. A limited number of circumstances could cause unexpected results.

The JIRA instance is using an unsupported configuration. See the Resolution section for steps on how to resolve this issue.

The database collation '<collation>' is unsupported by JIRA. The table collation '<collation>' is supported by JIRA. A limited number of circumstances could cause unexpected results.

The JIRA instance is using an unsupported configuration. See the Resolution section for steps on how to resolve this issue.

The table collation '<collation>' is unsupported by JIRA. The database collation '<collation>' is supported by JIRA.  A limited number of circumstances could cause unexpected results.The JIRA instance is using an unsupported configuration. See the Resolution section for steps on how to resolve this issue.

ソリューション 

これを修正するには、データベース照合を修正する必要があります。最適かつ推奨される方法は、次のとおりです。

  1. Create a new database with the required collation as per the appropriate documentation in Connecting the Jira application to a Database.
  2. Follow our Switching Databases documentation to migrate JIRA from the old databases (with the incorrect collation) to the new one, with the correct collation.

Supported Collations in PostgreSQL Database

Collation(s)How to Verify Table CollationsHow to Verify Database Collations
  • c
  • C.UTF-8
  • POSIX
  • POSIX.UTF-8
  • en_US.UTF-8
  • English_United States:1252
SELECT DISTINCT COALESCE(collation_name, 'DEFAULT') collation_name 
FROM   information_schema.columns 
WHERE  table_schema = Current_schema();

If a table collation is not set, 'DEFAULT' will be returned by this SQL, which the Health Check will accept.

SELECT datcollate 
FROM   pg_database 
WHERE  datname = Current_database(); 

Or,

SELECT datcollate AS collation
FROM pg_database
WHERE datname = current_database();

(warning) We should also check for Postgres Search Path.  There are know cases where the path contains multiple schemas such that the first one on the list is not the Jira schema.  For example:

jira=> show search_path ;
  search_path
────────────────
 public, jiradb
(1 row)

The above has two schemas on the path, with 'public' being the first one followed by 'jiradb' (the one used by Jira).  The table collations query uses 'Current_schema()', which will return the first schema on the path, which is 'public'.  If schema 'public' has no tables, then the query will return zero rows.  If 'public' has tables, the query will return a collation, but it won't be the correct one either.  So, we recommend setting the Search Path to include only the Jira schema.


最終更新日: 2024 年 2 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.