Live data from Hacker News

PostgreSQL for Everything

raphaelbauer.com

211–220 of 286 posts

Re: PostgreSQL for Everything

#211
My go-to has been replicas for each use case, with well defined semantics for replication lags. I'm working on something that does most of this seamlessly (transactional,search, columnar & time series, vectors and queues) without having to bother about extension management, replication setup or tuning.

Hopefully there is some value in this - one click multipurpose postgres fleet.

Re: PostgreSQL for Everything

#212

This isn't just theory either, for example: Revolut is a bank that does all its event persistence and streaming on top of postgres. No traditional message queues/brokers in their stack. https://medium.com/revolut/recording-more-events-but-where-w...

If you start here, with the "Postgres will take you wherever you need to go" meme, without thinking extremely deeply about your schema and how you expect to evolve it in the future, you can easily paint yourself into a very difficult and expensive corner. It's easy to use Postgres poorly in ways that result in painful centralized bottlenecks. (Obviously this is largely true for anything , but I think that in 2026, wh…

> If you start here, with the "Postgres will take you wherever you need to go" meme, without thinking extremely deeply about your schema and how you expect to evolve it in the future, you can easily paint yourself into a very difficult and expensive corner.

Yeah, backwards compatibility is not a thing for Java, Rust, C++, etc. :eye-roll:

Meanwhile in SQL if you need to make a backwards-incompatible change to your schema you can always use VIEWs and INSTEAD OF triggers to maintain backwards compatibility for code you've not fixed yet.

Re: PostgreSQL for Everything

#213

This isn't just theory either, for example: Revolut is a bank that does all its event persistence and streaming on top of postgres. No traditional message queues/brokers in their stack. https://medium.com/revolut/recording-more-events-but-where-w...

If you start here, with the "Postgres will take you wherever you need to go" meme, without thinking extremely deeply about your schema and how you expect to evolve it in the future, you can easily paint yourself into a very difficult and expensive corner. It's easy to use Postgres poorly in ways that result in painful centralized bottlenecks. (Obviously this is largely true for anything , but I think that in 2026, wh…

> in painful centralized bottlenecks.

I find the opposite to be true. I cut out the decentralization and get it all one one machine, and the bugs go away and the perf improves.

Re: PostgreSQL for Everything

#214
post #140

My general rule of thumb is "Use Postgres until you've discovered why you can't use Postgres." Anything you introduce is another moving part you have to operate and maintain, and in the beginning, Postgres can probably handle it. Wait for load, see where its failing, and then you'll have a better idea if adding another tool is worth the cost.

Doesn't the same argument apply even more to using SQLite instead?

No. SQLite doesn't have users, proper views, row level security, proper foreign keys, or functions.

Re: PostgreSQL for Everything

#215

This is exactly how tightly coupled, unmaintainable software is constructed. By picking the tools before understanding the model and building bespoke architecture. You pick the tools that the business model requires. It might be a relational data store. It might not be. You might want an event store. You might want to reduce costs with lambdas and DynamoDB. You may need a pub/sub event broker. The OP clearly loves Po…

> You might want to reduce costs with lambdas and DynamoDB.

I don't think that's ever saved money.

> because if they had that experience, they would have never written this article.

That's not true.

Re: PostgreSQL for Everything

#216

This isn't just theory either, for example: Revolut is a bank that does all its event persistence and streaming on top of postgres. No traditional message queues/brokers in their stack. https://medium.com/revolut/recording-more-events-but-where-w...

If you start here, with the "Postgres will take you wherever you need to go" meme, without thinking extremely deeply about your schema and how you expect to evolve it in the future, you can easily paint yourself into a very difficult and expensive corner. It's easy to use Postgres poorly in ways that result in painful centralized bottlenecks. (Obviously this is largely true for anything , but I think that in 2026, wh…

I once needed to maintain an application written in everything Oracle. If I ever encounter the original author of that product: I have things to say to him.

We quickly replaced part by part by easier, less costly parts.

Software development is not just writing code; I think all HN users know that.

Re: PostgreSQL for Everything

#217
post #176

> My tip: Start with PostgreSQL as a queueing system. Only when that does no longer perform well switch to other systems like Kafka, RabbitMQ or SQS. My tip: store your company's source code on a samba file server. Only when that no longer performs well, switch to other systems like Git.

Hehe, not too popular an idea is it? Maybe there's some characteristic about a version control system that makes it qualitatively different from a file store. Maybe it has nothing to do with size or number of customers!

Re: PostgreSQL for Everything

#218
post #140

Earlier quoted context omitted.

Doesn't the same argument apply even more to using SQLite instead?

No. SQLite doesn't have users, proper views, row level security, proper foreign keys, or functions.

What don't you like about SQLite views or foreign keys?

Re: PostgreSQL for Everything

#219
post #218

Earlier quoted context omitted.

No. SQLite doesn't have users, proper views, row level security, proper foreign keys, or functions.

What don't you like about SQLite views or foreign keys?

For example you can’t insert or update a SQLite view.

I don’t even think SQLite lets you fully update a table schema.

If you start trying to use it for sql and not just storing rows you run into these everywhere. SQLite is not serving the same needs as Postgres.

Re: PostgreSQL for Everything

#220

Earlier quoted context omitted.

The primary reason to avoid doing so is avoiding thrashing your buffers, along with increased size of backups, WAL bloat, etc. Can you? Yes. Should you? Not at anything beyond a toy scale, unless you want to pay for more RAM to ensure that your normal OLTP queries don’t take a performance hit.

Listen to this advice. I had a system that has ~600gb of blob data in bytea that could have easily been an S3 bucket + db reference. It made backups way more of a pain than necessary. It was intentional in the design, because I wanted total consistency with a single backup for the system. It worked great for years. But as we got more and more clients, it really should have been migrated to the above design to make su…

So the original advice actually still stands. You can still start off with Posgres, store it in BYTEA columns, and then work on a plan to use an object storage as you grow. S3 may not be possible and you will be evaluating other options like Minio
Post reply on HN