lnd/kvdb/postgres
Olaoluwa Osuntokun 43a1ca4f3d
kvdb/postgres: remove global application level lock
In this commit, we remove the global application level lock from the
postgres backend. This lock prevents multiple write transactions from
happening at the same time, and will also block a writer if a read is on
going. Since this lock was added, we know always open DB connections
with the strongest level of concurrency control available:
`LevelSerializable`. In concert with the new auto retry logic, we ensure
that if db transactions conflict (writing the same key/row in this
case), then the tx is retried automatically.

Removing this lock should increase perf for the postgres backend, as now
concurrent write transactions can proceed, being serialized as needed.
Rather then trying to handle concurrency at the application level, we'll
set postgres do its job, with the application only needing to retry as
necessary.
2024-09-30 16:58:46 -07:00
..
config.go multi: fix make lint 2022-11-18 20:48:23 +08:00
db.go kvdb/postgres: remove global application level lock 2024-09-30 16:58:46 -07:00
db_test.go kvdb/postgres: separate general sql code from postgres 2023-01-23 09:05:11 +02:00
driver.go kvdb/postgres: remove old +build directive and cleanup 2023-01-23 09:05:11 +02:00
fixture.go kvdb: set postgres max_connections on the started instance 2024-01-24 21:38:54 +01:00
fixture_interface.go channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00