this post was submitted on 25 Feb 2024
42 points (97.7% liked)

Selfhosted

40296 readers
185 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I want to migrate my Nextcloud instance from MariaDB over to PostgreSQL. I already have a PostgreSQL service running for Lemmy. And I'm pretty starved for RAM.

Would it be better to just have one PostgreSQL service running that serves both Nextcloud and Lemmy? Or should every service have its own PostgreSQL instance?

I'm pretty new to PostgreSQL. But in my mind I would tend towards one service to serve them all and let it figure out by itself how to split resources between everything. Especially when I think that in the long run I will probably migrate more services over to PostgreSQL (and upgrade the RAM).

But maybe I am overlooking something.

Edit: Thanks guys, I've settled for a single instance for now. And after a little tuning everything seems to be running better than ever, with room to spare.

you are viewing a single comment's thread
view the rest of the comments
[–] magikmw@lemm.ee 17 points 9 months ago (1 children)

If you're the only user and just want it working without much fuss, use a single db instance and forget about it. Less to maintain leads to better maintenance, if performance isn't more important.

It's fairly straightforward to migrate a db to a new postgres instance, so you're not shooting yourself in a future foot if you change your mind.

Use PGTune to get as much as you can out of it and adjust if circumstances change.

[–] bjoern_tantau@swg-empire.de 6 points 9 months ago (2 children)

It's fairly straightforward to migrate a db to a new postgres instance, so you're not shooting yourself in a future foot if you change your mind.

That's what I needed to hear. I'll just try it out and see what works best for me. Stupid me didn't even think of that.

I'm not really bothered about services going down all at once. The server is mostly just used by me and my family. We're not losing money if it's out for an hour or so.

[–] magikmw@lemm.ee 2 points 9 months ago

In a hobby it's easy to get carried away into doing things according to "best practices" when it's not really the point.

I've done a lot of redundant boilerplate stuff in my homelab, and I justify it by "learnding". It's mostly perfectionism I don't have time and energy for anymore.

[–] Dark_Arc@social.packetloss.gg 2 points 9 months ago* (last edited 9 months ago)

Remember that databases were designed to host multiple databases for multiple users... As long as you're working with maintained software (and you are) it should be pretty trivial to run on the latest version of Postgres and have everything just work using one instance if you're resource constrained.

Definitely a good point about being able to migrate as well. Postgres has excellent tools for this sort of thing.