Live data from Hacker News

Why does everyone run ancient Postgres versions?

neon.tech

51–60 of 452 posts

Re: Why does everyone run ancient Postgres versions?

#51

> Postgres 17.0 has been out for a bit and ... No. It's been released in September 2024. That's not "quite a bit". Now as to why people aren't all on 17 and not even on 16 yet, here's an acronym for you: LTS [1] Debian 11 Bullseye is the current LTS. It came out in 2021. [1] https://en.wikipedia.org/wiki/Long-term_support

Debian doesn't have LTS and non-LTS.

Debian has Stable. That's it.

Re: Why does everyone run ancient Postgres versions?

#52

Earlier quoted context omitted.

What's the alternative? MySQL? No transactional DDL, immediate fail.

It's not just DDL that isn't transactional, there's a whole bunch of other things that aren't. And they break the transactionality silently. It's like an obstical course where bumping into something might be fatal.

What specific non-DDL things are you referring to here?

Aside from DDL, the only other major ones are manipulating users/grants, manipulating replication, a small number of other administrative commands, and LOCK TABLES.

This is all documented very clearly on https://dev.mysql.com/doc/refman/8.4/en/implicit-commit.html. Hardly an "obstical course".

Re: Why does everyone run ancient Postgres versions?

#53
post #29

Earlier quoted context omitted.

Have postgres updates actually been requiring users do migrations? Or is this just a fear that something will go wrong?

Well if it's self-hosted you have to do it yourself. You can either backup your databases from the old version and restore it to the new version once installed, or you can use pg_upgrade to upgrade/copy a old version data directory to the new version. I don't think this is done automatically when you simply install a new postgres version, but I'm not certain of that.

[deleted]

Re: Why does everyone run ancient Postgres versions?

#54

If PostgreSQL has replication, why are they talking about "minimal" downtime? Is there no quorum strategy that delivers high availability? I don't know as much as I should.

Writes happen on your primary. At some point, you need to stop accepting writes, wait for the replica to fully catch up, reverse the replication so the replica is the new primary, then direct writes to the new primary. That's hard to do without any downtime.

There's no option where the nodes all accept writes.

Re: Why does everyone run ancient Postgres versions?

#55
post #25

Databases tend to be "stickier" than other parts of any large software system. Largely because database migrations are costly. You can't just tear down an old database and rebuild a new one, you have to figure out how to move all that data across too. The consequence is that things in database-land tends to move slower than other types of software. This I think is the major reason why we still use SQL.

What's the SQL alternative?

JSON - er JSON-based document storage - documents with unique identifiers. and the ability to define and set schemas for the JSON, and ... we're back to a relational database

Re: Why does everyone run ancient Postgres versions?

#56

Earlier quoted context omitted.

And the fact that adding real utf-8 support limited (limits?) the length of strings that can be indexed

Postgres limits btree keys to 2704 bytes, which is actually slightly smaller than MySQL's limit of 3072 bytes, assuming the default InnoDB storage engine. That said, when using utf8mb4 in an index key, MySQL uses the "worst case" of each character being 4 bytes. So it effectively limits the max key size to 3072/4 = 768 characters, when a column is using the utf8mb4 character set. For practical purposes, this doesn't…

> So it effectively limits the max key size to 3072/4 = 768 characters, when a column is using the utf8mb4 character set.

This is exactly what I mean. 768 characters for an index is woefully bad. And for no obviously great reason: you can just index the encoded UTF-8 text.

This was literally reason why a former company (who will remain nameless) refused to add Unicode support. It's not even an imagined problem.

Re: Why does everyone run ancient Postgres versions?

#58
post #3

I've always found it fascinating that there is a vocal contingent at HN that seems to legitimately hate advertising. But then an article like this turns up that is obvious advertising and is also a good article - we get a nice summary of what the major performance features over different postgres versions are, and some interesting case studies (I'd never even heard of the NOT VALID option although apparently it is no…

This is something I've heard called "permission marketing". The idea is that you show genuinely useful ads to only the few people who will benefit from them, rather than indiscriminately blasting millions of innocent bystanders. Then these few people will actually welcome your marketing efforts. The classic example is advertising a new improved fishing reel in a fishing magazine. People buy the magazine (well, 20 yea…

Well said. If I'm reading about fishing, for instance, an ad for a new piece of fishing gear would not be too annoying, as long as it isn't too intrusive (like popping up in the middle of my reading).

But when I'm watching a YouTube video, having the video cut mid-sentence to some hyper-annoying and unrelated noisy ad simply angers me and makes me look for an ad-blocker.

Re: Why does everyone run ancient Postgres versions?

#59

Earlier quoted context omitted.

Postgres limits btree keys to 2704 bytes, which is actually slightly smaller than MySQL's limit of 3072 bytes, assuming the default InnoDB storage engine. That said, when using utf8mb4 in an index key, MySQL uses the "worst case" of each character being 4 bytes. So it effectively limits the max key size to 3072/4 = 768 characters, when a column is using the utf8mb4 character set. For practical purposes, this doesn't…

> So it effectively limits the max key size to 3072/4 = 768 characters, when a column is using the utf8mb4 character set. This is exactly what I mean. 768 characters for an index is woefully bad. And for no obviously great reason: you can just index the encoded UTF-8 text. This was literally reason why a former company (who will remain nameless) refused to add Unicode support. It's not even an imagined problem.

Why did you need to index fairly long strings in their entirety in a way that preserves collation behaviors?

And why is a 768 character limit woefully bad, but a 2704 character limit is totally fine?

Re: Why does everyone run ancient Postgres versions?

#60
post #8

Because upgrading is a lot of work, and is higher risk than upgrading other software.

Seems like a massive design fail if they can't maintain backwards compatability and provide a safe, low friction upgrade process.

95% of projects are design fails in this regard... few projects think about Day 2 Ops
Post reply on HN