-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5366 from bottlepay/postgres
kvdb: add postgres
- Loading branch information
Showing
33 changed files
with
2,380 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,31 @@ | ||
# Postgres support in LND | ||
|
||
With the introduction of the `kvdb` interface, LND can support multiple database | ||
backends. One of the supported backends is Postgres. This document | ||
describes how it can be configured. | ||
|
||
## Building LND with postgres support | ||
|
||
To build LND with postgres support, include the following build tag: | ||
|
||
```shell | ||
⛰ make tags="kvdb_postgres" | ||
``` | ||
|
||
## Configuring Postgres for LND | ||
|
||
In order for LND to run on Postgres, an empty database should already exist. A | ||
database can be created via the usual ways (psql, pgadmin, etc). A user with | ||
access to this database is also required. | ||
|
||
Creation of a schema and the tables is handled by LND automatically. | ||
|
||
## Configuring LND for Postgres | ||
|
||
LND is configured for Postgres through the following configuration options: | ||
|
||
* `db.backend=postgres` to select the Postgres backend. | ||
* `db.postgres.dsn=...` to set the database connection string that includes | ||
database, user and password. | ||
* `db.postgres.timeout=...` to set the connection timeout. If not set, no | ||
timeout applies. |
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.