Commit Graph

18 Commits

Author SHA1 Message Date
Andras Banki-Horvath
25af657ad5
kvdb: set postgres max_connections on the started instance 2024-01-24 21:38:54 +01:00
Elle Mouton
170160f28a
kvdb+refactor: move all general sqlite code to seprate dir
In this commit, all the sql, non-postgres-specific, code is moved out of
the postgres package and into a new sqlbase package. This will make it
more easily reusable for future sql integrations.
2023-01-23 09:05:11 +02:00
Elle Mouton
30ba8cbae9
kvdb/postgres: separate general sql code from postgres
In this commit, changes are made to the `kvdb/postgres` package so that
all all the non-postgres-specific code is generalised to be applicable
for all sql code. A follow up commit will move all the general sql code
into its own package.
2023-01-23 09:05:11 +02:00
Elle Mouton
3dfaa88bb4
kvdb/postgres: remove old +build directive and cleanup
Due to the update of the kvdb package to go1.18, the `// +build`
directives are no longer required. They are removed in this commit in
order to simplify upcoming commits. Along the way, a few typos are fixed
and an unused struct is removed.
2023-01-23 09:05:11 +02:00
Elle Mouton
c6abf585ee
kvdb/postgres: make global dbConns thread safe
In this commit, a mutex is added to guard access to the global dbConns
variable in the kvdb/postgres package.
2023-01-23 09:05:11 +02:00
yyforyongyu
84fd911b47
multi: fix make lint
Fixes new lint errors caught by the latest version.
2022-11-18 20:48:23 +08:00
yyforyongyu
4db6617d45
multi: skip checking long lines for config files 2022-10-20 23:59:09 +08:00
Joost Jager
b8408a1484
kvdb: add ForAll
A new method to allow efficient range queries for backends that support
it.
2022-01-12 19:11:53 +01:00
Joost Jager
99566b768e
kvdb/postgres: use readonly db transaction if possible 2022-01-12 13:38:56 +01:00
Joost Jager
7cd7cef6c6
htlcswitch: fix duplicate close
The decayed log database opening and closing is managed at a higher
level in config_builder.go.
2022-01-10 08:42:32 +01:00
Joost Jager
0cae55c162
kvdb/postgres: fix context cancellation 2021-12-22 14:54:43 +01:00
Joost Jager
62a2f3c809
kvdb/postgres: fix tests 2021-12-22 14:54:41 +01:00
Joost Jager
274faff980
postgres: add connection limit 2021-11-17 11:08:43 +01:00
Oliver Gugger
41c579fd09
multi: run go fmt with go 1.17 2021-11-08 22:39:41 +01:00
Joost Jager
d997bbf6b3
channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00
Joost Jager
7c048efa21
kvdb/postgres/test: single instance embedded postgres database
Prepare for parallel tests that use a postgres backend. We don't want a
high number of embedded postgres instances running simultaneously.
2021-10-29 10:54:42 +02:00
Joost Jager
bd291286f7
kvdb/postgres: convert all types of panic data to error
Previously the assumption existed that panic data was already an error.
If that wasn't the case for example because panic("string") was used,
the transaction wasn't unlocked.
2021-10-29 10:54:40 +02:00
Joost Jager
3eb80cac97
kvdb: add postgres 2021-09-21 10:44:18 +02:00