How to Embed PostgreSQL (or other) databases in Tauri app for offline support #5418
-
Hello there, I am building a Tauri app where I want to bring offline support. So for that, I would need a database (I am preferring PostgreSQL) embedded into my Tauri app so that the user can read and manipulate data even when there is no internet connection. Also, The application's users are non-technical people and they can not install PostgreSQL individually. So it has to be one single installer that bundles everything. Any help of suggestion will be highly appreciated. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
imo embedding postgresql is not feasible at all and afaik not even possible. The only alternative would be to actually install postgresql on the user's system which sounds horrible to me. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/faokunega/pg-embed |
Beta Was this translation helpful? Give feedback.
-
sqlite3 is good choice |
Beta Was this translation helpful? Give feedback.
-
Can you share with me any updates regarding this issue? I have the same question but for MongoDB. |
Beta Was this translation helpful? Give feedback.
-
@hmShuvo314 Maybe look into this |
Beta Was this translation helpful? Give feedback.
-
pglite seems promising |
Beta Was this translation helpful? Give feedback.
imo embedding postgresql is not feasible at all and afaik not even possible. The only alternative would be to actually install postgresql on the user's system which sounds horrible to me.
So imho choosing a different database designed for this usecase, like sqlite or couchbase lite (nosql), is a more reasonable solution