Live data from Hacker News

Why does everyone run ancient Postgres versions?

neon.tech

351–360 of 452 posts

Re: Why does everyone run ancient Postgres versions?

#351
post #123

Earlier quoted context omitted.

Also: 5. If your IT department is spread thin already and that old version is running fine, the incentive to potentially create more work for yourself is not gigantic.

One of the first laws of the universe that a good engineer learns is: Do not fix what is not broken. And no, being old is not broken.

This is alternately known as Chesterton's Fence.

https://en.wikipedia.org/wiki/G._K._Chesterton#Chesterton's_...

Re: Why does everyone run ancient Postgres versions?

#352
post #123

Earlier quoted context omitted.

Also: 5. If your IT department is spread thin already and that old version is running fine, the incentive to potentially create more work for yourself is not gigantic.

One of the first laws of the universe that a good engineer learns is: Do not fix what is not broken. And no, being old is not broken.

[deleted]

Re: Why does everyone run ancient Postgres versions?

#353
post #107

Earlier quoted context omitted.

I doubt it was true in 2012, because sysadmins would be the ones trying to make it run reliably, including things like replication, upgrades, etc. Pretty sure that even in 2012 MySQL had very easy to use replication, which Postgres didn't have well into the late 2010s (does it today? It's been a while since I've ran any databases).

In 2012 MySQL had several flavors of replications, each with its own very serious pitfalls that could introduce corruption or loss of data. I saw enough of MySQL replication issues in those days that I wouldn't want to use it. But sure, it was easy to get a proof of concept working. But when you tried to break it by turning off network and/or machines, then shit broke down in very broken ways that was not recoverable…

> pitfalls that could introduce corruption or loss of data

sometimes, repairing broken data is easier than, say, upgrading a god damn hot DB.

MVCC is overrated. Not every row in a busy MySQL table is your transactional wallet balance. But to upgrade a DB you have to deal with every field every row every table, and data keeps changing, which is a real headache

Fixing a range of broken data, however, can be done by a junior developer. If you rely on rdbms for a single source of truth you are probably fucked anyway.

btw I do hate DDL changes in MySQL.

Re: Why does everyone run ancient Postgres versions?

#354
post #162

Upgrading isn't automatic. Let me check what I'm on... brb... Postgres 14. Because it's not automatic I leave it, I leave it until it's so unsupported that I must upgrade the whole system, then I build a new system with a new Postgres and I migrate the old to the new. I want, so badly, for Postgres to just automatically update itself, that a new binary just works with the data directory of an old version, and that if…

If you're using Debian or Ubuntu, investigate 'pg_upgradecluster'.

A full example procedure is documented in /usr/share/doc/postgresql-common/README.Debian.gz, under the heading “Default clusters and upgrading”.

Re: Why does everyone run ancient Postgres versions?

#355

Because the actual process of upgrading Postgres is terrible. I say this as someone who absolutely loves using it, but the actual process of upgrading Postgres is something that takes significant downtime, is error-prone and you're often better off just dumping all the databases and reimporting them in a new folder. (A good idea in general since it'll vacuum and compact indexes as well if you do it, combining a few m…

> Postgres is software you want to be managed by your distro. Why? For production systems I generally try to avoid using anything not built internally. When it comes to PostgreSQL, for example, if you want to submit benchmarks, or you want to report bugs, an important or sometimes a mandatory component is to provide compilation flags. Also, seeing how every kind of storage can act in a different way, tuning of higher…

> if you want to submit benchmarks, or you want to report bugs, an important or sometimes a mandatory component is to provide compilation flags

On all open-source distros, you can look into your distro's source and check their compile flags.

Re: Why does everyone run ancient Postgres versions?

#356
post #175

Lol, try upgrading old MongoDB stuff. Database engines (every single one) are notorious for incompatibilities between major versions, upgrading mission critical stuff means updating and re-testing entire applications, which in some cases can be a multi-million dollar process, before going into production. Even if you deeply know/think that there's no problem upgrading, if something does fail in production after an up…

This. I was tasked with upgrading Postgresql from a very old version (I think 9?) to one that was still supported a couple of years ago. Backwards compatibility is paramount and from my experience upgrading MySQL/MariaDB I know that changes in versions can break it. For this reason, I chose to upgrade to version 11 because it was only a couple of versions apart and still had repositories available at the time. So the…

> there are external plugins for postgres that were installed in the old version. I search for the plugins online and they are long discontinued.

You can hardly blame PostgreSQL for that.

Re: Why does everyone run ancient Postgres versions?

#357
post #162

Upgrading isn't automatic. Let me check what I'm on... brb... Postgres 14. Because it's not automatic I leave it, I leave it until it's so unsupported that I must upgrade the whole system, then I build a new system with a new Postgres and I migrate the old to the new. I want, so badly, for Postgres to just automatically update itself, that a new binary just works with the data directory of an old version, and that if…

I used to do the old pgdump for backups, but after using pgbackrest at work for years I see no reason not to use it for every cluster I want to back up.

I like pointing it at an S3 bucket so I have another full backup repo (with its own retention strategy) away from my homelab, as well as to my local NAS.

Re: Why does everyone run ancient Postgres versions?

#358
post #145

Earlier quoted context omitted.

Also for licensing reasons for a long time there was surviving contingent of MySQL 3.23 in LAMP hosting.

While that change from LGPL to GPL affected only the client library (server always was GPL(+commercial)) and the MySQL company relatively quickly reacted with a FOSS exception to the GPL and by providing a reimplementation of the client library under PHP license (mysqlnd) to serve that market. (I joined MySQL shortly after that mess, before the Sun acquisition)

Random hosting providers that were major place for having your baby steps on LAMP stack didn't necessarily grok licensing much

Re: Why does everyone run ancient Postgres versions?

#359

Earlier quoted context omitted.

A URL, for instance, can't be safely stored in 768 characters, but it can be stored safely in 2704. If you then wanted to sort those URLs so that all URLs for each domain and path within that domain are adjacent, you need an index. Especially if you want to paginate over them with a cursor. Doing that without an index on the raw value is a royal pain in the ass. Hell, even just being able to sort user-submitted strin…

> it can be stored safely in 2704 No, it can't. URL doesn't have any length limit, regardless of the fact that different software will impose different limits.

Browser address bars have a limit of 2048, so if that's your use case, yes it's safe.

Re: Why does everyone run ancient Postgres versions?

#360

Earlier quoted context omitted.

A URL, for instance, can't be safely stored in 768 characters, but it can be stored safely in 2704. If you then wanted to sort those URLs so that all URLs for each domain and path within that domain are adjacent, you need an index. Especially if you want to paginate over them with a cursor. Doing that without an index on the raw value is a royal pain in the ass. Hell, even just being able to sort user-submitted strin…

To be honest, indexes aren't designed for that. They're meant for fast lookup of short identifiers. Things like people's names and product ID's. Not long URL's. It's not performant. If you need to keep a million long URL's in a defined sort order, my first recommendation would be, don't -- see if there's another way to achieve your end result. But if you absolutely have to, then create a new integer column to be your…

> indexes aren't designed for that. They're meant for fast lookup of short identifiers. Things like people's names and product ID's. Not long URL's. It's not performant.

This is objectively false. If this was true, indexes wouldn't serve range queries. You couldn't index on dates. You couldn't sort numbers.

> But if you absolutely have to, then create a new integer column to be your sort key, and use a little bit of extra code to give it values that produce the same sort order.

This fails when you need to insert new values into the table. Then you not only need to figure out the new integer value (how, if you can't efficiently compare sorted string values???), you need to update all the integers to make room.

Post reply on HN