Skip to content

Commit 8f05eef

Browse files
Merge pull request #968 from lightninglabs/docs-lnd
Update lnd documentation
2 parents de39f2a + 33f0c7c commit 8f05eef

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docs/lnd/postgres.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ db.postgres.timeout=0
4242
Connection timeout is disabled, to account for situations where the database
4343
might be slow for unexpected reasons.
4444

45+
Moreover for particular kv tables we also add the option to access the
46+
tables via a global lock (single wirter). This is a temorpary measure until
47+
these particular tables have a native sql schema. This helps to mitigate
48+
resource exhaustion in case LND experiencing high concurrent load:
49+
50+
* `db.postgres.walletdb-with-global-lock=true` to run LND with a single writer
51+
for the walletdb_kv table (default is true).
52+
* `db.postgres.channeldb-with-global-lock=false` to run the channeldb_kv table
53+
with a single writer (default is false).
54+
4555
## Important note about replication
4656

4757
In case a replication architecture is planned, streaming replication should be avoided, as the master does not verify the replica is indeed identical, but it will only forward the edits queue, and let the slave catch up autonomously; synchronous mode, albeit slower, is paramount for `lnd` data integrity across the copies, as it will finalize writes only after the slave confirmed successful replication.

docs/lnd/release-notes/release-notes-0.20.1.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@
5151

5252
## Performance Improvements
5353

54+
* [Added new Postgres configuration
55+
options](https://github.com/lightningnetwork/lnd/pull/10394)
56+
`db.postgres.channeldb-with-global-lock` and
57+
`db.postgres.walletdb-with-global-lock` to allow fine-grained control over
58+
database concurrency. The channeldb global lock defaults to `false` to enable
59+
concurrent access, while the wallet global lock defaults to `true` to maintain
60+
safe single-writer behavior until the wallet subsystem is fully
61+
concurrent-safe.
62+
5463
## Deprecations
5564

5665
# Technical and Architectural Updates

0 commit comments

Comments
 (0)