Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-37756

Upgrade failed with the error message: "ERROR: cannot ALTER TABLE "content" because it has pending trigger events"

XMLWordPrintable

      Environment

      (Optional - If Applicable)

      • PosgreSQL
      • Confluence 5.7.4

      Steps to Reproduce

      1. Have Confluence 5.6.6
      2. Alter the tables to DEFERRABLE INITIALLY DEFERRED
      3. Upgrade to Confluence 5.7.4

      Expected Results

      Upgrade successful

      Actual Results

      Upgrade unsuccessful with the following exception is thrown in the atlassian-confluence.log file:

      [ALTER TABLE CONTENT add constraint  fk6382c05917d4a070 foreign key (PREVVER) references CONTENT(CONTENTID)]; SQL state [55006]; error code [0]; ERROR: cannot ALTER TABLE "content" because it has pending trigger events; nested exception is org.postgresql.util.PSQLException: ERROR: cannot ALTER TABLE "content" because it has pending trigger events
      

      Causes

      The tables has a foreign constraint of DEFERRABLE INITIALLY DEFERRED instead of DEFERRABLE INITIALLY IMMEDIATE

      Workaround

      1. Change all the constraint to DEFERRABLE INITIALLY IMMEDIATE so the checking will be performed after each statement.
        • Use the attached txt file to alter all the foreign key constraint to DEFERRABLE INITIALLY IMMEDIATE alter constraint.txt.
      2. Continue with the upgrade again.

      More information

      Go to the KB https://confluence.atlassian.com/pages/viewpage.action?pageId=747606853

        1. alter constraint.txt
          11 kB
          Monique Khairuliana

              Unassigned Unassigned
              mkhairuliana Monique Khairuliana (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: