Using a postgres database instead of local storage #4438
-
|
I want to run trillium, and the main issue is that I have a small vps that has only 2GB of storage left, and I wish to use a cockroach 10gb postgres storage for free. Is there a way to connect trillium to it? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
|
I don't think so, Trilium uses a sqlite db by default and I would say that would be extremely difficult to change that, you would need to go hard in the code and deal with things like:
I didn't dive into the code yet but these seems only the beginning, since AFAIK sqlite was chosen not only for being lightweight but also for performance reasons. But perhaps you could achieve what you want (somehow) using the Sync Server, anything that provides Docker and internet connection would do I think. |
Beta Was this translation helpful? Give feedback.
-
|
I take probably 5-7 meeting notes a day, plus store all of my habit tracking, user manuals and software development notes and artifacts in Trilium and have for a year. My db is about 80megs. So I think that 2gb should be more than enough. My .02 |
Beta Was this translation helpful? Give feedback.
-
|
I think DB abstraction can be implemented gradually. They will become increasingly relevant as multiple users are considered 1. More users will generate databases of larger size effecting performance and other metrics. This makes the freedom of choice of databases more relevant. We could start by first including a micro abstraction layer, and then start rewriting microscopic small parts of the application. Later expanding the rewrite step by step. This would be a very long but stable process. But since every single step in between would result in stable software, the longevity of the process wouldn't even matter. I can imagine that something like Kysely could be used: Implementing a database abstraction will make Trilium a more scalable and flexible solution for teams - at least over the very long time. Footnotes |
Beta Was this translation helpful? Give feedback.
I don't think so, Trilium uses a sqlite db by default and I would say that would be extremely difficult to change that, you would need to go hard in the code and deal with things like:
I didn't dive into the code yet but these seems only the beginning, since AFAIK sqlite was chosen not only for being lightweight but also for performance reasons.
But perhaps you could achieve what you want (somehow) using the Sync Server, anything that provides Docker and internet connection would do I think.