Skip to content

Commit 01048bb

Browse files
committed
add doc about DataPath config option
1 parent 2764d1d commit 01048bb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,16 @@ This library aims to require as little configuration as possible, favouring over
3636
| Database | postgres |
3737
| Version | 12.1.0 |
3838
| RuntimePath | $USER_HOME/.embedded-postgres-go/extracted |
39+
| DataPath | empty, results in *RuntimePath*/data |
3940
| Port | 5432 |
4041
| StartTimeout | 15 Seconds |
4142

43+
The *RuntimePath* directory is erased and recreated on each start and therefor not
44+
suitable for persistent data. If a persistent data location is required, set
45+
*DataPath* to a directory outside of *RuntimePath*.
46+
If the *RuntimePath* directory is empty or already initialized but with an incompatible
47+
postgres version, it gets cleared and reinitialized.
48+
4249
A single Postgres instance can be created, started and stopped as follows
4350
```go
4451
postgres := embeddedpostgres.NewDatabase()

0 commit comments

Comments
 (0)