renterd icon indicating copy to clipboard operation
renterd copied to clipboard

Postgres support

Open artur9010 opened this issue 1 year ago • 5 comments
trafficstars

Description

I saw a PR on walletd adding postgres support - https://github.com/SiaFoundation/walletd/pull/57 it would be nice to also have it in renterd as some of users may prefer it over mysql/sqlite

Version

v1.0.6

What operating system are you running (e.g. Ubuntu 22.04, macOS, Windows 11)?

Ubuntu 22.04, kubernetes

Anything else?

No response

artur9010 avatar Mar 28 '24 14:03 artur9010

We are adding Postgres support in walletd because it doesn't have support for MySQL yet. We are considering adding support for Postgres to renterd as well but it probably won't happen short term.

Depends on https://github.com/SiaFoundation/renterd/issues/1134

ChrisSchinnerl avatar Mar 28 '24 14:03 ChrisSchinnerl

I'm interested in pushing forward on renterd. I am attempting to get postgresql working by reading the mysql bits and translating to postgresql fu. If you have a better codebase, love to look, and if I my code gets scrapped for better upstream down the road, fine. But sqlite is not useful for pushing renterd hard in the slightest. You can see my (botched?) wip attempt at ttf-renterd fwiw.

toddfries avatar Jun 21 '24 00:06 toddfries

You are obviously free to open a PR to add Postgres support but it wouldn't be wise to get started now since our database code is currently being migrated away from GORM. Meaning it's in a mixed state that is still under a lot of development.

If you want I can ping you here once the codebase is ready to get started on Postgres support.

ChrisSchinnerl avatar Jun 21 '24 07:06 ChrisSchinnerl

Do you have instruction to convert from sqlite to postgres after then? I also want to change into postgres.

Postgres will use for db and consensus?

cmdntd avatar Oct 04 '24 16:10 cmdntd

We don't have any official instructions but you should be able to find existing tools and instructions which can help with that. I haven't used it yet but pgloader seems to be one of these tools.

Consensus will remain in BoltDB but any metadata and metrics would be stored in Postgres

ChrisSchinnerl avatar Oct 21 '24 11:10 ChrisSchinnerl