Flake.nix Phoenix & PostgreSQL

Hi, thanks very much for this - it looks great, however I’m having some trouble with postgres.

In particular when I exit and reenter a shell and do:

nix develop
pg-setup
pg-start

and then try and run my tests,I get Postgres errors as follows:

** (Postgrex.Error) FATAL 58P01 (undefined_file) could not open file "global/pg_filenode.map": No such file or directory
    (db_connection 2.4.3) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
    (connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 4.2) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol

Any ideas as to why this is happening would be much appreciated.

1 Like