Skip to content

Replace hardcoded localhost with 127.0.0.1 or a configurable host for local connection #10

@nomyfan

Description

@nomyfan

pg0 currently hardcodes localhost in its PostgreSQL connection URIs.

On machines where localhost resolves to an address other than 127.0.0.1, pg0 start can fail during follow-up connection steps, and the reported URI can also be unusable for clients.

Suggested fix:

  • replace hardcoded localhost with 127.0.0.1 for local TCP connection URIs
  • or introduce a configurable host for local connections, with 127.0.0.1 as the default

Why this helps:

  • avoids DNS / host resolution variance for localhost
  • preserves a deterministic default for the common local case
  • leaves room for environments that prefer or require a different loopback host such as ::1

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