timescale / promscale

[DEPRECATED] Promscale is a unified metric and trace observability backend for Prometheus, Jaeger and OpenTelemetry built on PostgreSQL and TimescaleDB.
https://www.timescale.com/promscale
Apache License 2.0
1.33k stars 169 forks source link

Fail to use unix sockets (URI parsing issues) #1783

Open kworr opened 1 year ago

kworr commented 1 year ago

Describe the bug When setting host to point to UNIX socket path it picked up correctly and URI is constructed correctly. However when attempting to connect:

promscale[27837]: level=error ts=2022-12-05T06:30:47.822Z caller=runner.go:127 msg="aborting startup due to error" err="cannot parse postgresql://postgres:@%2Ftmp%2F.s.PGSQL.5432:5432/timescale?application_name=promscale%400.16.0&connect_timeout=60&sslmode=require: failed to parse as URL (parse \"postgresql://postgres:@%2Ftmp%2F.s.PGSQL.5432:5432/timescale?application_name=promscale%400.16.0&connect_timeout=60&sslmode=require\": invalid URL escape \"%2F\")"

To Reproduce Set -db.host to /tmp/.s.PGSQL.5432 (and -db.name).

Expected behavior Escape patterns accepted. They are used to hide "/" in database name part.

Version

-- Might be just required library is not enabling proper UNIX sockets support.