Bamboo fails to start after PostgreSQL migration with error relation build does not exist


アトラシアン コミュニティをご利用ください。



Bamboo fails to start after migrating PostgreSQL database to another PostgreSQL server with the following steps:

  1. Migrate PostgreSQL server through pg_dump to another server
  2. Configure bamboo.cfg.xml to refer to the new PostgreSQL server

atlassian-bamboo.log に次のメッセージが出力される。

2017-08-24 15:59:22,866 ERROR [localhost-startStop-1] [AbstractUpgradeManager] org.postgresql.util.PSQLException: ERROR: relation "build" does not exist
  Position: 34
org.postgresql.util.PSQLException: ERROR: relation "build" does not exist
  Position: 34
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(
	at org.postgresql.core.v3.QueryExecutorImpl.execute(
	at org.postgresql.jdbc.PgStatement.execute(
	at org.postgresql.jdbc.PgStatement.executeWithFlags(
	at org.postgresql.jdbc.PgStatement.executeQuery(
	at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(
	at com.atlassian.bamboo.upgrade.tasks.validation.PlanKeysCorrectlyFormatted$1.doInHibernateTransaction(
	at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.withDatabaseConnection(


Run the following SQL query to check if there is a search_path configured for the database user:

SELECT r.rolname, d.datname, rs.setconfig
FROM   pg_db_role_setting rs
LEFT   JOIN pg_roles      r ON r.oid = rs.setrole
LEFT   JOIN pg_database   d ON d.oid = rs.setdatabase
WHERE  r.rolname = 'databaseUser' OR d.datname = 'databaseName';

Replace databaseUser and databaseName with the settings in bamboo.cfg.xml

If there is no result, it means that the database user is using the default search_path public


  • PostgreSQL is using the search_path public by default
  • The database dump is migrated to a custom schema and/or the database user is configured with incorrect search_path


Configure the database user to use the correct search_path with the following SQL and restart Bamboo:

ALTER ROLE databaseUser SET search_path TO customSchema;

Replace databaseUser and customSchema with the correct settings

最終更新日 2019 年 9 月 23 日


Powered by Confluence and Scroll Viewport.