Someone at FOSDEM 2023 asked the question: “What happens when PostgreSQL rolls over the version number to 95? Will this cause problems like back then in Windows?”
What does that even mean? When Microsoft released the version after Windows 98, they opted for naming it Windows 10, not Windows 9. Because apparently a lot of code out there checks if the string starts with “Windows 9” and then assumes that the OS is one of the very old ones. This might not be the only such problem, as another blog article by Microsoft shows. Apparently they used “3.95” for the Windows 95 internal version, because lazy programmers.
You may also remember that there is already a “Postgres95”, released around 1994 (shortly before Windows 95 was released). This was before the name was PostgreSQL, and this is the first version which had SQL support. Before that, QUEL was the query language.
Enough history. And even though the release of PostgreSQL 95 is still a few years out, this raises two questions:
- Does today’s source code work (aka: compile, and pass tests) with version number 95?
- Does your application work against version PostgreSQL 95?
Does the source code work with version number 95?
The first question is easy to answer:
- Download PostgreSQL source code
- Change the version number to 95
- Compile everything
- Run regression tests
The latest version (by the time I’m writing this article) is 15.2
. Download the source from the main website.
There are only two files (one, really) which hold the version information: configure and configure.ac.
|
|
After that, compile everything, and init a database:
|
|
That works. No surprises here. It also passes all the regression tests:
|
|
Starting the database works without problems:
|
|
Connecting to the database works as well:
|
|
And it shows the correct version:
|
|
|
|
Even though I changed the version from 15.2
to just 95
, without a minor number, everything works out of the box. The source code is well prepared for the future!
Does your application work against version PostgreSQL 95?
Obviously that’s something only you can answer, but you can already create a CI/CD pipeline today and test your application against a future version of PostgreSQL. Instructions above.
psql works, as seen above. Let’s try out pgAdmin, one of the standard management applications for PostgreSQL.
pgAdmin works without problems.
Conclusion
Surely a PostgreSQL 95 version is still many years out, nevertheless the question asked at FOSDEM is a good one. Maybe not test for a version 80 years out, but will your application work in 2 or 5 years, or does it require major changes along the way? It also depends how closely the application follows the SQL standard, or uses PostgreSQL internals. And if drivers and protocols change over time. And finally, if your application has hardcoded version checks, like the ones which Microsoft had to deal with.
And let’s hope our beloved elephant is still around to celebrate a version number 95.