diff --git a/specs/postgres/template/.gitignore b/specs/postgres/template/.gitignore new file mode 100644 index 0000000..ff9b393 --- /dev/null +++ b/specs/postgres/template/.gitignore @@ -0,0 +1,2 @@ +# The default location of a generated database cluster. +/data/ diff --git a/specs/postgres/template/README.md b/specs/postgres/template/README.md index 05fc50b..0428032 100644 --- a/specs/postgres/template/README.md +++ b/specs/postgres/template/README.md @@ -12,16 +12,16 @@ $> nix develop To begin, create a new database: ```bash -pg_ctl initdb +$> pg_ctl initdb ``` If the flake's default `devShell` is loaded, this will create a database cluster at `$PWD/data`. To start the database, run the following: ```bash -pg_ctl start -o --unix_socket_directories="$PGDATA" +$> pg_ctl start -o --unix_socket_directories="$PGDATA" ``` To shut the database down, run: ```bash -pg_ctl stop +$> pg_ctl stop ``` You can also specify a different location for the database cluster using the `-D` option in each of the above commands.