org.postgresql.util.PSQLException

ERROR: database "foo" is being accessed by other users Detail: There is 1 other session using the database.

Samebug tips1

Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: <postgresql.version>9.4.1211</postgresql.version>


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1540

  • via GitHub by thokari
    ,
  • Stack trace

    • org.postgresql.util.PSQLException: ERROR: database "foo" is being accessed by other users Detail: There is 1 other session using the database. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2453) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2153) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:286) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:305) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:291) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:269) at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:249) at com.nttdata.RunSqlScript.dropDatabase(RunSqlScript.java:71) at com.nttdata.RunSqlScript.main(RunSqlScript.java:28)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    johnxflyjohnxfly
    2 times, last one
    serious2monkeysserious2monkeys
    24 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    derproggerderprogger
    Once,
    91 more bugmates