github.com/decred/dcrlnd@v0.7.6/docs/postgres.md (about)

     1  # Postgres support in LND
     2  
     3  With the introduction of the `kvdb` interface, LND can support multiple database
     4  backends. One of the supported backends is Postgres. This document
     5  describes how it can be configured.
     6  
     7  ## Building LND with postgres support
     8  
     9  To build LND with postgres support, include the following build tag:
    10  
    11  ```shell
    12  ⛰  make tags="kvdb_postgres"
    13  ```
    14  
    15  ## Configuring Postgres for LND
    16  
    17  In order for LND to run on Postgres, an empty database should already exist. A
    18  database can be created via the usual ways (psql, pgadmin, etc). A user with
    19  access to this database is also required.
    20  
    21  Creation of a schema and the tables is handled by LND automatically.
    22  
    23  ## Configuring LND for Postgres
    24  
    25  LND is configured for Postgres through the following configuration options:
    26  
    27  * `db.backend=postgres` to select the Postgres backend.
    28  * `db.postgres.dsn=...` to set the database connection string that includes
    29    database, user and password.
    30  * `db.postgres.timeout=...` to set the connection timeout. If not set, no
    31    timeout applies.