Comment by doubled112
3 days ago
I prefer a separate DB instance for each app. Each app is on a separate ZFS filesystem so I can snapshot/backup the app data and DB together as one.
A possible restore only affects that app. Plus I can guarantee the files and DB were snapshotted at the same moment this way.
It may just be a way for me to avoid managing the DB.
Plus sometimes these apps have specific requirements. One thing needs Postgres 16, the other needs Postgres 18... maybe it works to point both at 18, maybe it doesn't. Easier to just give everything its own instance and use whatever the recommended Postgres version is. I doubt there is any major difference in resource usage
Isn't a snapshot of the db a bad idea? At least you won't always be able to restore from that. You'll need a dump for that to work.
A filesystem snapshot shouldn’t be much different than pulling the plug and powering it back on.
Does a DB fall apart every time that happens? It does happen, but I might argue it shouldn’t happen, especially in simple configurations.
I do have an automatic daily dump in case of emergencies.
I do the same, a single app on a zfs filesystem I can snapshot/send/receive