Change Postgres connection port

Is it possible to change the port Redash connects to Postgres?

I had initially set-up Redash successfully and connected to Postgres, but after a few days, it was impossible to start Postgres on port 5432. I even tried reinstalling but it forcefully sets the port to 5433. I have tried to change the port to 5433 on redash/query_runner/pg.py but there is no change.

How can I change the port flask listens to, to 5433 or any other for that matter?

You should be able to edit the data source settings in the Redash UI:

In the hosted version you access it through the settings icon next to your profile thumbnail:

image

Hosted URL:
https://app.redash.io/MyRedashAccount/data_sources

Hi, assuming you are talking about the postgres database used internally by Redash and not a data source; Redash derives the connection port as part of the database connection URL that is set in the environment variable REDASH_DATABASE_URL. How this is set initially depends on how you are deploying Redash but this is where it ultimately needs to change.

1 Like