timescale / pg_influx

InfluxDB Line Protocol Listener for PostgreSQL
Apache License 2.0
17 stars 3 forks source link

Wait for background worker start #8

Open mkindahl opened 1 year ago

mkindahl commented 1 year ago

Situation

Currently, the worker_launch function will register the background worker and wait for the process to start using WaitForBackgroundWorkerStartup.

Problem

The procedure above do not wait for the background worker to bind to the port and start listening on it, which means that if any of these fail, there is no indication to the session that issues the command that this failure happened. This complicates testing and also make the usability worse since it can look like the system started the background workers, but they actually exited quite soon after as a result of an error.

Solution