On Fri, Oct 22, 2021 at 6:42 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > So my first thought was just to revert 92316a458 and give up on it as > a bad idea. However ... does anyone actually still care about being > able to dump from such ancient servers?
I think I recently heard about an 8.4 server still out there in the wild, but AFAICR it's been a long time since I've heard about anything older. It seems to me that if you're upgrading by a dozen server versions in one shot, it's not a totally crazy idea that you might want to do it in steps, or use the pg_dump for the version you have and then hack the dump. I kind of wonder if there's really any hope of a pain-free upgrade across that many versions anyway. There are things that can bite you despite all the work we've put into pg_dump, like having objects that depend on system objects whose definition has changed over the years, plus implicit casting differences, operator precedence changes, => getting deprecated, lots of GUC changes, etc. You are going to be able to upgrade in the end, but it's probably going to take some work. So I'm not really sure that giving up pg_dump compatibility for versions that old is losing as much as it may seem. Another thing to think about in that regard: how likely is that PostgreSQL 7.4 and PostgreSQL 15 both compile and run on the same operating system? I suspect the answer is "not very." I seem to recall Greg Stark trying to compile really old versions of PostgreSQL for a conference talk some years ago, and he got back to a point where it just became impossible to make work on modern toolchains even with a decent amount of hackery. One tends to think of C as about as static a thing as can be, but that's kind of missing the point. On my laptop for example, my usual configure invocation fails on 7.4 with: checking for SSL_library_init in -lssl... no configure: error: library 'ssl' is required for OpenSSL In fact, I get that same failure on every branch older than 9.2. I expect I could work around that by disabling SSL or finding an older version of OpenSSL that works the way those branches expect, but that might not be the only problem, either. Now I understand you could have PostgreSQL 15 on a new box and PostgreSQL 7.x on an ancient one and connect via the network, and it would in all fairness be cool if that Just Worked. But I suspect that even if that did happen in the lab, reality wouldn't often be so kind. -- Robert Haas EDB: http://www.enterprisedb.com