Upgrade 4.0 -> 5.0 fails with ERROR: function pg_try_advisory_lock(bigint) does not exist

On our teamcity server for wicketstuff (http://wicketstuff.org/teamcity) I get a nasty database error after trying to install teamcity 5.0:

We have postgresql 8.1.4 running which should be compatible with teamcity 5...

jetbrains.buildServer.serverSide.db.UnexpectedDBException: SQL error when doing: Querying for a single string
SQL query: select pg_try_advisory_lock(?)
SQL exception: ERROR: function pg_try_advisory_lock(bigint) does not exist
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
   at jetbrains.buildServer.serverSide.db.DBFunctions.queryForSingleString(DBFunctions.java:327)
   at jetbrains.buildServer.serverSide.db.DBFunctionsForPostgress.tryToAcquireVirtualLock(DBFunctionsForPostgress.java:7)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:62)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processServerStartup(TeamCityDispatcherServlet.java:138)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$000(TeamCityDispatcherServlet.java:2)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$1.run(TeamCityDispatcherServlet.java:2)
   at java.lang.Thread.run(Thread.java:595)
caused by: org.postgresql.util.PSQLException: ERROR: function pg_try_advisory_lock(bigint) does not exist
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
   at jetbrains.buildServer.serverSide.db.DBFunctions.queryForSingleString(DBFunctions.java:327)
   at jetbrains.buildServer.serverSide.db.DBFunctionsForPostgress.tryToAcquireVirtualLock(DBFunctionsForPostgress.java:7)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processStartupServerInternal(TeamCityDispatcherServlet.java:62)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.processServerStartup(TeamCityDispatcherServlet.java:138)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet.access$000(TeamCityDispatcherServlet.java:2)
   at jetbrains.buildServer.rootDispatcher.TeamCityDispatcherServlet$1.run(TeamCityDispatcherServlet.java:2)
   at java.lang.Thread.run(Thread.java:595)

3 comments
Comment actions Permalink

I've tried to downgrade the postgresql JDBC driver to an 8.1 version (postgresql-8.1-408.jdbc3.jar). but that didn't make any difference. Also note that I deployed the J2EE war file instead of running the distribution.

0
Comment actions Permalink

Martijn,

could you please upgrade your PostgreSQL server up to 8.4.x?

It should cure the problem.

Thanks

0
Comment actions Permalink

It took a while for the admin with root access to upgrade the server to postgresql 8.4, but now it works.

0

Please sign in to leave a comment.