postgres: Add gitignore and prompts to bash markdown.

pull/10/head
Joshua Potter 2023-11-28 09:18:43 -07:00
parent c5bceaa1d0
commit ba9e6648bd
2 changed files with 5 additions and 3 deletions

2
specs/postgres/template/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# The default location of a generated database cluster.
/data/

View File

@ -12,16 +12,16 @@ $> nix develop
To begin, create a new database: To begin, create a new database:
```bash ```bash
pg_ctl initdb $> pg_ctl initdb
``` ```
If the flake's default `devShell` is loaded, this will create a database cluster If the flake's default `devShell` is loaded, this will create a database cluster
at `$PWD/data`. To start the database, run the following: at `$PWD/data`. To start the database, run the following:
```bash ```bash
pg_ctl start -o --unix_socket_directories="$PGDATA" $> pg_ctl start -o --unix_socket_directories="$PGDATA"
``` ```
To shut the database down, run: To shut the database down, run:
```bash ```bash
pg_ctl stop $> pg_ctl stop
``` ```
You can also specify a different location for the database cluster using the You can also specify a different location for the database cluster using the
`-D` option in each of the above commands. `-D` option in each of the above commands.