Open
Description
This:
test = withSystemTempDirectory "test" $ \dir -> do
withDb (dir </> "db") $ \_ -> return ()
looks reasonable but causes scary-looking (but benign) output:
pg_ctl: directory "/run/user/1000/test-af26b0f35c589919/db/work" is not a database cluster directory
gargoyle-nix-postgres-monitor: /run/user/1000/test-af26b0f35c589919/db/control: removeLink: does not exist (No such file or directory)
It seems that withDb
returns before gargoyle actually shuts down, and therefore withSystemDirectory
deletes the postgres instance before pg_ctl has a chance to shut it down.
Metadata
Assignees
Labels
No labels