From 7c9bd931963e6d84a73daf34d59d1058584ef25a Mon Sep 17 00:00:00 2001 From: asvdf <91805022+asvdf@users.noreply.github.com> Date: Mon, 13 Dec 2021 15:32:33 +0100 Subject: [PATCH] docs: update postgres docs with sample configuration --- docs/postgres.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/postgres.md b/docs/postgres.md index 1b46e7a74..16d0f0594 100644 --- a/docs/postgres.md +++ b/docs/postgres.md @@ -6,10 +6,12 @@ describes how it can be configured. ## Building LND with postgres support -To build LND with postgres support, include the following build tag: +Since `lnd v0.14.1-beta` the necessary build tags to enable postgres support are +already enabled by default. The default release binaries or docker images can +be used. To build from source, simply run: ```shell -⛰ make tags="kvdb_postgres" +⛰ make install ``` ## Configuring Postgres for LND @@ -29,3 +31,13 @@ LND is configured for Postgres through the following configuration options: database, user and password. * `db.postgres.timeout=...` to set the connection timeout. If not set, no timeout applies. + +Example as follows: +``` +[db] +db.backend=postgres +db.postgres.dsn=postgresql://dbuser:dbpass@127.0.0.1:5432/dbname +db.postgres.timeout=0 +``` +Connection timeout is disabled, to account for situations where the database +might be slow for unexpected reasons.