Upgrade from jira 6.1.7 to 7.1.0 fails: Exception thrown during upgrade: ERROR: cross-database references are not implemented

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.

*Except Fisheye and Crucible

Problem

When performing an upgrade from JIRA 6.1.x to JIRA 7.1.x with your instance connected to a Postgres DB, the upgrade fails. The following error appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 Exception thrown during upgrade: ERROR: cross-database references are not implemented: "public.audit_item.idx_audit_item_log_id" org.postgresql.util.PSQLException: ERROR: cross-database references are not implemented: "public.audit_item.idx_audit_item_log_id" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2101) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1834) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:372) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:364) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) at com.atlassian.jira.upgrade.tasks.DropIndexTask.dropIndex(DropIndexTask.java:24)

Diagnostic

  • Enable verbose logging in postgres and observe the log (http://www.postgresql.org/docs/9.0/static/runtime-config-logging.html)

  • Look for entries in the verbose logs that look like the following:

    1 2 3 4 5 6 7 2016-03-04 14:28:09 CET [23855-15739] jiradbuser@jiradb LOG: duration: 0.091 ms parse <unnamed>: DROP INDEX public.audit_item.idx_audit_item_log_id 2016-03-04 14:28:09 CET [23855-15740] jiradbuser@jiradb LOG: duration: 0.010 ms bind <unnamed>: DROP INDEX public.audit_item.idx_audit_item_log_id 2016-03-04 14:28:09 CET [23855-15741] jiradbuser@jiradb ERROR: cross-database references are not implemented: "public.audit_item.idx_audit_item_log_id" 2016-03-04 14:28:09 CET [23855-15742] jiradbuser@jiradb STATEMENT: DROP INDEX public.audit_item.idx_audit_item_log_id

Resolution

Please make sure to make a database backup before making any changes in the database.

  • Please stop the server.

  • Please DROP the table with the below SQL query:

1 2 DROP INDEX idx_audit_item_log_id; DROP INDEX idx_audit_item_log_id2;
  • Please restart the server.

  • You should be able to continue with the upgrade with no issues.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.