-
Bug
-
Resolution: Timed out
-
Medium
-
None
-
5.7.4, 5.9.5
-
3
-
Severity 2 - Major
-
Environment
(Optional - If Applicable)
- PosgreSQL
- Confluence 5.7.4
Steps to Reproduce
- Have Confluence 5.6.6
- Alter the tables to DEFERRABLE INITIALLY DEFERRED
- 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
- 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.
- Continue with the upgrade again.
More information
Go to the KB https://confluence.atlassian.com/pages/viewpage.action?pageId=747606853