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

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

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:

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:  

    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

tip/resting Created with Sketch.

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:
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.


Last modified on Nov 12, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.