Reinitiate index creation on Foreign Key columns managed by Bamboo

Platform Notice: Data Center Only - This article only applies to Atlassian apps 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

Summary

Bamboo Data Center automatically creates indexes on all foreign key columns to maintain performance. The indexing is handled by the AddIndicesToForeignKeys task, which typically runs during upgrades as part of the repeatable upgrade process. If these indexes are removed, Bamboo may experience slowdowns. This article outlines the steps to manually re-trigger the AddIndicesToForeignKeys task, without a full upgrade.

Solution

Before you begin

These steps require you to update the database. Before you begin, back up your database using your database’s native tools. For detailed instructions, see your database provider’s official documentation. After you update the database, you’ll need to restart Bamboo. Plan for this downtime to avoid unexpected disruptions.

The solution has been validated in Bamboo 11.0.5 but may be applicable to other versions.

Steps to reinitiate index creation

  1. Check the current build number in the Bandana table:

    SELECT serialized_data FROM public.bandana where bandana_key = 'com.atlassian.bamboo.upgrade.tasks.repeatable.AddIndicesToForeignKeys:buildNumber'

    Example: For Bamboo 11.0.5, the build number is <string>110008</string>.

  2. Update the build number to a lower value:

    Replace <lower_build_number> with a number lower than the current build number (e.g., 110008).

    UPDATE public.bandana SET serialized_data = '<string>lower_build_number</string>' WHERE bandana_key = 'com.atlassian.bamboo.upgrade.tasks.repeatable.AddIndicesToForeignKeys:buildNumber'

  3. Restart Bamboo Data Center:

    1. Stop Bamboo by executing <BAMBOO-INSTALL-DIR>/bin/stop-bamboo.sh or <BAMBOO-INSTALL-DIR>/bin/stop-bamboo.bat

    2. Start Bamboo by executing <BAMBOO-INSTALL-DIR>/bin/start-bamboo.sh or <BAMBOO-INSTALL-DIR>/bin/start-bamboo.bat

  4. Verify index creation in the logs:

    After restart, check the Bamboo logs for entries similar to:

    INFO [AddIndicesToForeignKeys] Index creation finished after ... INFO [AbstractUpgradeManager] Task ... completed successfully.

Updated on January 2, 2026

Still need help?

The Atlassian Community is here for you.