Live data from Hacker News

Do you need separate systems when you already have Postgres?

postgresisenough.dev

31–40 of 90 posts

Re: Do you need separate systems when you already have Postgres?

#31
I'll do you one better: do you really need Postgres and all these extensions when you already have a filesystem?

> only after pushing Postgres to its limits, documenting why it was insufficient, and accepting the operational cost of the alternative

I love Postgres as a DB but, really, this is ridiculous. No doubt these extensions can do the job well-enough but you might as well invest in learning the right tool for the problem from the start, when the stakes are still pretty low. Why wait until, ahem, Postgres is pushed to the limit before you spin up a Redis cluster?

You don't get free opcost by using Postgres for everything. Arguably if you end up with a monolith of a database, you are paying a higher opcost (imagine if too much caching can affect all CRUD ops in your platform). Or you can manage a cluster of PG instances but that's no less complex---each plugin still comes with its own opcost!

No Silver Bullet, No Free Lunch, and all that. If your problem domain really warrants something outside of relational storage, you're gonna pay that complexity cost one way or another. You can't escape it by shoehorning everything in Postgres, fantastic as a DB as it is.

Re: Do you need separate systems when you already have Postgres?

#32
post #22

Earlier quoted context omitted.

Oh no, redis is super simple to set up and use. It's just that setting it up is not as simple as not setting it up.

OK, but it is relatively easy to setup. Obviously, nobody thinks it is _literally_ effortless.

Every extra straw you put on the back of your ops team, especially when you're a young company, adds weight. It's good to be choosey about which technologies actually justify that expenditure.

Re: Do you need separate systems when you already have Postgres?

#33

I'll do you one better: do you really need Postgres and all these extensions when you already have a filesystem? > only after pushing Postgres to its limits, documenting why it was insufficient, and accepting the operational cost of the alternative I love Postgres as a DB but, really, this is ridiculous. No doubt these extensions can do the job well-enough but you might as well invest in learning the right tool for t…

Do filesystems offer ACID guarantees though? Depending on the use case, something like sqlite might work better (or write to a CAS system like S3).

Re: Do you need separate systems when you already have Postgres?

#35
post #22
post #13

I love Postgres, and I agree with the general sentiment. But I read the (growing) genre of "use Postgres for everything" articles and they imply a difficulty in running other software that I just don't see. I'm thinking of Redis in particular. If you're using it as incredibly fast but not critical storage, it's trivial to set up and it ~never crashes or requires maintenance. It creates no headaches, and in exchange g…

Oh no, redis is super simple to set up and use. It's just that setting it up is not as simple as not setting it up.

For smaller projects and locally, I'm running background services via a compose file... it's a few lines of configuration, and just works. Redis is crazy low hanging fruit.. even job queues that run over Redis make a bit more sense than with Postgres more often than not.

I'm far more hesitant to throw a more formal MQ in the mix though... mostly from experience in that a lot of mid level ("senior") developers don't really understand queues very well at all. Even if conceptually, using tables for queues is more complex.

That said, I will use PG for workflows similar to K/V, Document (JSONB) and other structures over reaching for say MongoDB, etc.

Re: Do you need separate systems when you already have Postgres?

#40
post #30

The thing that usually pushes you off Postgres is rarely raw throughput, it's two workloads that want opposite tuning on the same box.

The solution might be to move to separate Postgres boxes everything that needs performance tuning at all. I'm not in the "use Postgres for everything" camp, but only because I think it's too complex to be used like that. It should be replaced with a bunch of simple primitives in this role. No SQL and query planning magic please.

YES!

The problem of all the datastores is that are applications (like Wordpress) so you are too late to fix anything deep.

We need "frameworks" (so each sub-component can be used as-is or even swapped) and even wondering what a "system level" data engine could be.

Post reply on HN