Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error is shown when directory is deleted too quickly #23

Open
ryantrinkle opened this issue Apr 21, 2019 · 1 comment
Open

Error is shown when directory is deleted too quickly #23

ryantrinkle opened this issue Apr 21, 2019 · 1 comment

Comments

@ryantrinkle
Copy link
Member

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.

@3noch
Copy link
Collaborator

3noch commented Apr 22, 2019

I've seen cases where it seems postgres is still running after the gargoyle app shuts down and I have to manually kill it. I wonder if this is why.

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

No branches or pull requests

2 participants