Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation for postgresql database structure #6619

Closed
GordianLN opened this issue Jun 6, 2022 · 4 comments
Closed

Missing documentation for postgresql database structure #6619

GordianLN opened this issue Jun 6, 2022 · 4 comments
Assignees
Labels
database Related to the database/storage of LND docs good first issue Issues suitable for first time contributors to LND

Comments

@GordianLN
Copy link
Contributor

Background

Postgresql backend would allow for very fast data access, by directly querying the database with your coding language of choice and a DB driver, instead of using lnd as intermediary with gRPC. This will need previous knowledge of things to look for in the database.
I did open the DB with an explorer, and the contents are... overwhelming to say the least.
I personally have no advanced knowledge but I know my way around MySQL/MariaDB and SQLite, yet the (binary?) data stored in postgresql makes no sense at all to me.
I was expecting to find cleartext and tidy information about the state of life, the universe and everything, but 42 wasn't even in there among the scary amount of numbers I saw.
I honestly thought I'd find searchable output like the one lncli getchaninfo gives, for example, just waiting to be fetched with a query like SELECT * FROM channeldb WHERE chanid=nnnnnnnnnn.

Your environment

  • version of lnd 0.14.3
  • which operating system (uname -a on *Nix) latest raspios
  • version of btcd, bitcoind, or other backend 22
  • any other relevant environment details /

Steps to reproduce

Open postgresql with something like adminer

Expected behaviour

Find human-readable data

Actual behaviour

Be violently hit with all the cold indifference of binary data

@Roasbeef Roasbeef added database Related to the database/storage of LND good first issue Issues suitable for first time contributors to LND docs labels Jun 6, 2022
@guggero
Copy link
Collaborator

guggero commented Jun 7, 2022

See #6288 for more context.

@84adam
Copy link
Contributor

84adam commented Feb 13, 2023

New contributor here. I'd like to take a stab at this.

@GordianLN
Copy link
Contributor Author

Actually, I'd now like to see SQLite support with clearly readable structure, just like CLN, and postgres>sqlite migration, but I guess I'm OT in my own issue 😅

@ziggie1984
Copy link
Collaborator

Closing with #7442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Related to the database/storage of LND docs good first issue Issues suitable for first time contributors to LND
Projects
None yet
Development

No branches or pull requests

5 participants