Skip to content

Better handling of existing PostgreSQL running on 5432 during install #375

@harrybiddle

Description

@harrybiddle

When running install.sh, if there is already a PostgreSQL running on port 5432, the install script will exhibit the following behaviour:

Initializing engine PostgresEngine default (sgr@localhost:5432/splitgraph)...
Waiting for connection...............
Error connecting to the engine after 12 retries

I'm guessing that this is because the Dockerized PostgreSQL is running on port 5432, which is already taken by my existing (non Dockerized) PostgreSQL. The CLI is quite helpful with the solution (run with ENGINE_PORT set). However, I think this is a pretty common situation: most people installing the sgr CLI will almost certainly already be running PostgreSQL on the default port, and we can do better out-of-the-box here.

I have two suggestions of how to remediate this:

  1. To reduce the likelihood of conflicts, sgr should not use 5432 by default, but some other port
  2. Install.sh could detect existing processes running on ENGINE_PORT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions