Live data from Hacker News

Things I hate about PostgreSQL (2020)

rbranson.medium.com

11–20 of 255 posts

Re: Things I hate about PostgreSQL (2020)

#11
post #7

Like many developers, I've used postgresql unquestioningly for many years, say 10. But if you ask me, I've rarely have had to face stringent scaling or availability requirements. Many deployments were a variation of AWS RDS or a similarly managed offering for HA. And they weren't exactly flawless. So this article is good food for thought. Why are we using postgresql? Because of the features, developer-friendliness, a…

I think Postgres is great for many of the same reasons that people often (wrongly) tout NoSQL systems for. It's flexible, featureful, simple and quick to get started. And unlike most NoSQL systems, it has full ACID compliance and can scale well past MVP stage to the point that most businesses will never hit its limitations.

If you do hit really huge scale then you will need to start looking beyond Postgres to solutions like Cassandra, Scylla, etc. But hopefully by that point you have a large dev team capable of handling the extra complexity.

Re: Things I hate about PostgreSQL (2020)

#12
post #10
post #7

Like many developers, I've used postgresql unquestioningly for many years, say 10. But if you ask me, I've rarely have had to face stringent scaling or availability requirements. Many deployments were a variation of AWS RDS or a similarly managed offering for HA. And they weren't exactly flawless. So this article is good food for thought. Why are we using postgresql? Because of the features, developer-friendliness, a…

You have to put your data somewhere... are commercial database vendors or nosql solutions that much better?

I cannot make an expert assessment myself but for one thing mysql is occasionally picked precisely because of its HA story.

It was the case in a couple past jobs of mine, back then I didn't particularly appreciate it but now I might see it with different eyes.

Also commercial databases do have a better HA story - at least that's their reputation.

The current status quo is that everything should be free, but obviously that has a fundamental contradiction with being a professional software developer in the first place.

Re: Things I hate about PostgreSQL (2020)

#13
post #4

The first paragraph, > Over the last few years, the software development community’s love affair with the popular open-source relational database has reached a bit of a fever pitch. This Hacker News thread covering a piece titled “PostgreSQL is the worlds’ best database”, busting at the seams with fawning sycophants lavishing unconditional praise, is a perfect example of this phenomenon. is exactly the kind of gratui…

This comment is very far from the mark: it would be closer to the truth to say the article is mostly complaining about lack of tools to help ameliorate problems caused by the architecture.

The author clearly likes Postgres and ends the piece by saying he expects all the problems he talks about to be solved in time.

Re: Things I hate about PostgreSQL (2020)

#14
post #7

Like many developers, I've used postgresql unquestioningly for many years, say 10. But if you ask me, I've rarely have had to face stringent scaling or availability requirements. Many deployments were a variation of AWS RDS or a similarly managed offering for HA. And they weren't exactly flawless. So this article is good food for thought. Why are we using postgresql? Because of the features, developer-friendliness, a…

I wouldn't say postgresql is a self inflicted problem, like eg some argue micro services are, it is rather that choosing PostgreSQL optimizes for developer experience over things like flawless HA and zero downtime upgrades. So the tradeoff is between being able to build products faster and cheaper while sacrificing some reliability.

Re: Things I hate about PostgreSQL (2020)

#15
post #9
post #4

The first paragraph, > Over the last few years, the software development community’s love affair with the popular open-source relational database has reached a bit of a fever pitch. This Hacker News thread covering a piece titled “PostgreSQL is the worlds’ best database”, busting at the seams with fawning sycophants lavishing unconditional praise, is a perfect example of this phenomenon. is exactly the kind of gratui…

Ok, what do you say about this one? > #9: Ridiculous No-Planner-Hints Dogma One of these "query shifts" that the author mentions happened with a production database where I work. It was down for two days. The query planner used to like using index X but at some point decided it didn't want to use that and decided it wanted to do a table scan inside a loop instead. Meaning: one day a certain query was working fine, th…

i think you need to provide more details for a good reply. what changed between the time index was used and when it wasn’t? I also had to “convince” postgresql to use my index but that lead to a much better design

Re: Things I hate about PostgreSQL (2020)

#16
post #9
post #4

The first paragraph, > Over the last few years, the software development community’s love affair with the popular open-source relational database has reached a bit of a fever pitch. This Hacker News thread covering a piece titled “PostgreSQL is the worlds’ best database”, busting at the seams with fawning sycophants lavishing unconditional praise, is a perfect example of this phenomenon. is exactly the kind of gratui…

Ok, what do you say about this one? > #9: Ridiculous No-Planner-Hints Dogma One of these "query shifts" that the author mentions happened with a production database where I work. It was down for two days. The query planner used to like using index X but at some point decided it didn't want to use that and decided it wanted to do a table scan inside a loop instead. Meaning: one day a certain query was working fine, th…

I feel that is the least fair of the complaints (I agree with several of them and have some of my own too). Not because query hints are not disreable but because who is going to pay for maintaing them? It is not really dogma (I, with dome help, managed to convince them to merge one very specific query hint: MATERIALIZED for CTEs) but that they do not want to expose more of the innards of the query planner than necessary to not slow down planner development. Planner development is hard enough as is, with query hints it is going to become at least twice as hard due to even more fear of breaking applications.

Re: Things I hate about PostgreSQL (2020)

#17
post #15
post #9

Earlier quoted context omitted.

Ok, what do you say about this one? > #9: Ridiculous No-Planner-Hints Dogma One of these "query shifts" that the author mentions happened with a production database where I work. It was down for two days. The query planner used to like using index X but at some point decided it didn't want to use that and decided it wanted to do a table scan inside a loop instead. Meaning: one day a certain query was working fine, th…

i think you need to provide more details for a good reply. what changed between the time index was used and when it wasn’t? I also had to “convince” postgresql to use my index but that lead to a much better design

> i think you need to provide more details for a good reply. what changed between the time index was used and when it wasn’t? I also had to “convince” postgresql to use my index but that lead to a much better design

I disagree: given that nothing changed, I don't think any details need to be provided.

The question is NOT "Is postgresql's choice better than mine?" The question is "A certain design was working and suddenly broke because one day the query planner decided to start choosing a different (and unusable) plan - is this ever acceptable?" and the answer is obviously No, regardless of the details.

Re: Things I hate about PostgreSQL (2020)

#18
post #8

I think it’s worth mentioning that most of these problems only occur at a scale that only top 1% of companies will reach. I’ve been using PostgreSQL for over a decade without reaching any of the mentioned scaling-related problems. PostgreSQL is still the best general purpose database in my opinion, and you can then consider using something else for parts of your application if you have special needs. I’ve used Cassan…

The problem is that you want to build something that can scale in the future.

Re: Things I hate about PostgreSQL (2020)

#19
post #8

I think it’s worth mentioning that most of these problems only occur at a scale that only top 1% of companies will reach. I’ve been using PostgreSQL for over a decade without reaching any of the mentioned scaling-related problems. PostgreSQL is still the best general purpose database in my opinion, and you can then consider using something else for parts of your application if you have special needs. I’ve used Cassan…

The problem is that you want to build something that can scale in the future.

I think I've heard a saying about this, something about premature optimisation...

Re: Things I hate about PostgreSQL (2020)

#20
post #7

Like many developers, I've used postgresql unquestioningly for many years, say 10. But if you ask me, I've rarely have had to face stringent scaling or availability requirements. Many deployments were a variation of AWS RDS or a similarly managed offering for HA. And they weren't exactly flawless. So this article is good food for thought. Why are we using postgresql? Because of the features, developer-friendliness, a…

I think Postgres is great for many of the same reasons that people often (wrongly) tout NoSQL systems for. It's flexible, featureful, simple and quick to get started. And unlike most NoSQL systems, it has full ACID compliance and can scale well past MVP stage to the point that most businesses will never hit its limitations. If you do hit really huge scale then you will need to start looking beyond Postgres to solutio…

PostgreSQL is better at being MongoDB than Mongo is.

You can just add a JSON column and do queries on the content, index the table on individual values etc.

Post reply on HN