Live data from Hacker News

PostgreSQL is enough

gist.github.com

1–10 of 323 posts

Re: PostgreSQL is enough

#2
I often go down rabbit holes like this, trying to collapse and simplify the application stack.

But inevitably, as an application grows in complexity, you start to realize _why_ there's a stack, rather than just a single technology to rule them all. Trying to cram everything into Postgres (or lambdas, or S3, or firebase, or whatever other tech you're trying to consolidate on) starts to get really uncomfortable.

That said, sometimes stretching your existing tech is better than adding another layer to the stack. E.g. using postgres as a message queue has worked very well for me, and is much easier to maintain than having a totally separate message queue.

I think the main takeaway here is that postgres is wildly extensible as databases go, which makes it a really fun technology to build on.

Re: PostgreSQL is enough

#5
Love postgres and use it extensively. However, there's always an issue when I start doing the more advanced stuff: how do I combine that with all my years of experience with version control, code reviews, types, tests, static analysis and all the niceties of coding in general?

Migrations?

Re: PostgreSQL is enough

#6

I often go down rabbit holes like this, trying to collapse and simplify the application stack. But inevitably, as an application grows in complexity, you start to realize _why_ there's a stack, rather than just a single technology to rule them all. Trying to cram everything into Postgres (or lambdas, or S3, or firebase, or whatever other tech you're trying to consolidate on) starts to get really uncomfortable. That s…

The same argument of UNIX design patterns (Single responsibility, well defined interfaces and communication protocals) vs Monolithic design patterns comes up a lot. I think that its mainly because both are effective at producing products, its just that they both have downsides.

Re: PostgreSQL is enough

#7
Aspiring to "use the right tool for the job" leads you into conflict with some of the ideas posted on the gist.

To give a concrete example on the first item in the gist: if i need periodic jobs - and all the operational headaches that go with (rerunning, ordering, dependencies, logging, yada yada...) - is postgres the right tool for the job?

It CAN be, but for most people in most circumstances, it's probably not.

Re: PostgreSQL is enough

#8
On the [Simplify: move code into databases](https://sive.rs/pg), has anyone actually tried this?

My instinct is that the output won't be simpler at all, but a big twisty web of varying parts and competing use cases, all extremely hard to discover. To me, having two things that do something distinct is simpler, and ironically, Rich Hickey says this exact thing in Simplicity Matters, which is quoted in the article.

Re: PostgreSQL is enough

#9
Postgres is enough as long as you have a good multi-tenant setup e.g. a separate database per customer.

Ran a single postgres instance with multi-tenant SaaS product that crossed 4B records in a few tables, even with partitions and all the optimization in the world, it still hurts to have one massive database.

We still got bought tho, so I will agree its enough

Re: PostgreSQL is enough

#10
Obligatory "depends". I'm aware of more than one company that uses postgres for huge datasets serving workflows with high throughput and importance.

It's truly a workhorse, it's comparatively a pleasure to work with, and its extensibility makes it useful in places some other DBs aren't suitable for.

But a relational DB isn't right for every workload.

Post reply on HN