Skip to content

Conversation

@abc3
Copy link

@abc3 abc3 commented May 26, 2025

If Postgres is not available at the time of startup, Postgrex.Notifications.start_link will kill the strategy process each time the supervisor restarts it, until all retries are exhausted.

{:ok, conn_notif} <- Postgrex.Notifications.start_link(state.meta.opts.()),

This PR fixes this behavior by starting Postgrex.Notifications with the :auto_reconnect option. This prevents the process from killing and allows it to keep retrying connection attempts in the background. Once Postgres becomes available again, the process will cast the node name into the cluster.

@abc3
Copy link
Author

abc3 commented May 26, 2025

cc @Ziinc @filipecabaco

@abc3
Copy link
Author

abc3 commented May 26, 2025

ah, auto_reconnect is already been added in #20

@abc3 abc3 closed this May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant