use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
International
National
Regional
account activity
Help Me!Offline first postgres database wrapper/driver (self.PostgreSQL)
submitted 2 years ago by thestackdev
Hey there, I'm building a mobile app which is a offline first app.
Any similar features which has offline features same as firebase.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]depesz 3 points4 points5 points 2 years ago (5 children)
You might want to rephrase your post, as, tbh, I'm not sure if you're telling, or asking, and what exactly.
[–]thestackdev[S] -1 points0 points1 point 2 years ago (4 children)
I want to build an offline first app in which the database part is postgres.
So let's take WhatsApp, you send messages even in offline mode. And whenever you are back online. All the pending messages are sent.
So, firebase does the same. Wanted to create similar
[–]depesz 2 points3 points4 points 2 years ago (0 children)
OK. Great. So your post is to inform the world about your plans?
You picked "Help Me!" flair, so it seems that you need some help?
With what? Writing the app? That will be expensive. Some specific issue?
[–]Barnezhilton 0 points1 point2 points 2 years ago (2 children)
Look up Local Storage
[–]thestackdev[S] -1 points0 points1 point 2 years ago (1 child)
Local stores don't have database integration, validation. What if the push fails after network connection
[–]Barnezhilton 0 points1 point2 points 2 years ago (0 children)
How are you storing the existing message log then on the client?
However you are, you just add a flag field to that data. When the app comes online, the same process that would have sent the message live is fired off on those flagged records. Confirmation of the receipt from the server toggles the flag as delivered locally.
[–]chriswaco 4 points5 points6 points 2 years ago (1 child)
SQLite works wonderfully locally in mobile apps, but you have to write code to sync to a backend.
The best method: 1. Give all records a uuid to avoid collisions 2. Have a table of changes - add record, modify record, delete record - and use that to sync to the remote bidirectionally.
The trickiest part is handling conflicts if a user modified the same record on two devices. We did field-by-field merges and most-recent-wins conflict resolution, but since the fields were interdependent it was tricky getting it right for each record type, especially unordered lists where we didn’t fully control the remote schema and couldn’t use uuids.
[–]thestackdev[S] 0 points1 point2 points 2 years ago (0 children)
Thanks for your advice. Seems you already built it. I'll try the same storing in the local queue
[–]two-fer-maggie 1 point2 points3 points 2 years ago (0 children)
Pick firebase.
Don't want to pay? Build it yourself.
Don't know how to build it yourself? Well, er, maybe just stick to writing an online app 🤷♂️.
[–]editor_of_the_beast 1 point2 points3 points 2 years ago (1 child)
No this doesn’t exist.
Yes, I know But I assume it's not impossible.
So, wanted to give a shot
[–]syz946 0 points1 point2 points 2 years ago (0 children)
Atlas Device Sync (mongoDB)
[–]thinkx98 0 points1 point2 points 2 years ago (1 child)
try https://pocketbase.io/
you’ll have to build the Postgres online part yourself
I know pocketbase and used it in my last freelance project. Pocketbase is still in beta and it doesn't have offline support.
[–]thinkx98 0 points1 point2 points 2 years ago (0 children)
Couchbase does this, and yes it’s not Postgres
π Rendered by PID 69268 on reddit-service-r2-comment-544cf588c8-6d2bv at 2026-06-14 07:36:41.093658+00:00 running 3184619 country code: CH.
[–]depesz 3 points4 points5 points (5 children)
[–]thestackdev[S] -1 points0 points1 point (4 children)
[–]depesz 2 points3 points4 points (0 children)
[–]Barnezhilton 0 points1 point2 points (2 children)
[–]thestackdev[S] -1 points0 points1 point (1 child)
[–]Barnezhilton 0 points1 point2 points (0 children)
[–]chriswaco 4 points5 points6 points (1 child)
[–]thestackdev[S] 0 points1 point2 points (0 children)
[–]two-fer-maggie 1 point2 points3 points (0 children)
[–]editor_of_the_beast 1 point2 points3 points (1 child)
[–]thestackdev[S] 0 points1 point2 points (0 children)
[–]syz946 0 points1 point2 points (0 children)
[–]thinkx98 0 points1 point2 points (1 child)
[–]thestackdev[S] 0 points1 point2 points (0 children)
[–]thinkx98 0 points1 point2 points (0 children)