When using a shared database connection pool amongst event stores the Postgrex database connection should only be stopped when all event stores using the connection have been stopped.
Previously the event store which started the Postgrex connection was responsible for terminating it. This was problematic if using dynamic event stores which may be started and stopped in any order. If the event store which started first and which started the shared connection pool was later stopped then any other event stores using the same connection pool could encounter an issue until the connection was restarted by one of them.
When using a shared database connection pool amongst event stores the Postgrex database connection should only be stopped when all event stores using the connection have been stopped.
Previously the event store which started the Postgrex connection was responsible for terminating it. This was problematic if using dynamic event stores which may be started and stopped in any order. If the event store which started first and which started the shared connection pool was later stopped then any other event stores using the same connection pool could encounter an issue until the connection was restarted by one of them.