-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a full postgres database implementation for dcrpool. - New config items to enable postgres and set database connection details. - Updated documentation to explain postgres usage. - Database backup features are disabled when using postgres. - All database tests are now run against both bolt and postgres database.
- Loading branch information
1 parent
6a19e0c
commit e1e81d9
Showing
15 changed files
with
1,132 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Running dcrpool with PostgreSQL | ||
|
||
Tested with PostgreSQL 13.0. | ||
|
||
**Note:** When running in Postgres mode, backups will not be created | ||
automatically by dcrpool. | ||
|
||
1. Connect to your instance of PostgreSQL using `psql` to create a new database | ||
and a new user for dcrpool. | ||
Be sure to substitute the example password `12345` with something more secure. | ||
|
||
```no-highlight | ||
postgres=# CREATE DATABASE dcrpooldb; | ||
CREATE DATABASE | ||
postgres=# CREATE USER dcrpooluser WITH ENCRYPTED PASSWORD '12345'; | ||
CREATE ROLE | ||
postgres=# GRANT ALL PRIVILEGES ON DATABASE dcrpooldb to dcrpooluser; | ||
GRANT | ||
``` | ||
|
||
1. **Developers only** - if you are modifying code and wish to run the dcrpool | ||
test suite, you will need to create an additional database. | ||
|
||
```no-highlight | ||
postgres=# CREATE DATABASE dcrpooltestdb; | ||
CREATE DATABASE | ||
postgres=# GRANT ALL PRIVILEGES ON DATABASE dcrpooltestdb to dcrpooluser; | ||
GRANT | ||
``` | ||
|
||
1. Add the database connection details to the dcrpool config file. | ||
|
||
```no-highlight | ||
postgres=true | ||
postgreshost=127.0.0.1 | ||
postgresport=5432 | ||
postgresuser=dcrpooluser | ||
postgrespass=12345 | ||
postgresdbname=dcrpooldb | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.