Open link in a new tab

Content

Expand project menu

Connect to postgres database

Hi everyone,

I need to connect to the Postgres database in order to make some reports, and I forgot the password. I am using PgAdmin or PowerBI. Can anyone help me?

Thanks,

Rodrigo

Message actions

From a reporting standpoint, I would like to see this also. Last time I tried to connect directly to PostgreSQL I crashed the server hosting OpenProject :(
Most likely this is a Linux/PostgreSQL configuration setting (ports?).

Message actions

On a packaged installation, you can get the connection details of the OpenProject database through the ENV flag DATABASE_URL.

openproject config:get DATABASE_URL

You can use this with psql directly: psql $(openproject config:get DATABASE_URL)

This can never crash OpenProject unless

  • you're somehow exceeding the max_connections of postgres, but then still OpenProject server would still hold to its connections
  • you're doing anything other than reading/updating or inserting according to the scheme in a way that is unsupported by OpenProject

In a docker-based installation, you can simply exec on the database container and run psql directly from there.

Best

Oliver