joplin
joplin copied to clipboard
Joplin.repl/reset and Joplin.repl/seed don't close connections
Using joplin.repl/reset
to roll back and migrate changes to a postgresql db and it doesn't close the connections it opens. I quickly reach my connection limit and have to force kill my postgres instance.
My joplin.edn
config defines my only database with {:type :sql, :url "jdbc:postgresql://localhost:5432/my-database?user=postgres&password=postgres"}
I have a separate psql client open to the postgres instance and run select * from pg_stat_database;
. The numbackends
which are connections to my database goes up by 10 each time I run reset (I have 5 roll backs and 5 migrations so presumably one new connection for each). Running joplin.repl/rollback
and joplin.repl/migrate
separately correctly closes all connections.
Same behavior exhibited by Joplin.repl/seed