Skip to content

Error is shown when directory is deleted too quickly #23

Open
@ryantrinkle

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions