this post was submitted on 16 Jan 2025
59 points (100.0% liked)

Selfhosted

41114 readers
626 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 2 years ago
MODERATORS
 

Hey, Threadiverse! I'm looking for informed opinions on database choices.

I can stand up an Internet-facing application and have it use either MySQL or PostgreSQL. Which is the better choice, and why do you think so?

Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] msage@programming.dev 7 points 1 day ago* (last edited 1 day ago)

Postgres is far superior in every way.

We used MySQL (and Percona XtraDB) servers at work, and it is so bad. So I made several presentations showing generic and specific reasons why Postgres is better. I had to cut a lot of content because MySQL is just that bad.

Some things may not seem relevant now, but as you keep the DB around long enough, you will appreciate the whole package of Postgres.

Things that will help a lot, but are extensions:

  • pg_partman - for automatic partition management
  • patroni - management of replicas, automatic failover - it does everything for you with simple commands

There is a DB comparison matrix, but hasn't been updated in over a year, which is a shame, but still gives you the idea of how different databases support SQL features: link.

Spoiler: postgres has the most support, with a huge lead

Edit: MySQL is dead last, btw