On 27/11/2018 18:30, Andres Freund wrote: > ISTM we should first go for python, python2, python3 in all branches, > and then have a separate master only commit that changes over the order > to prefer python3 over 2. I don't think preferring 3 over 2 would be > appropriate for past branches, but it'll surely become more common to > run into distros without "python" installed.
Thinking about this some more ... Leaving RHEL 8 aside, it would be reasonable to update the search order to "python, python3". That is because the next round of Linux distros is moving to Python 3 as their default, and a fresh install will only provide "python3" and no "python". (You can still install "python"+"python2" separately, at least for a while.) They might change "python" to point to "python3" in the future, but that is currently undecided. There will be a window of time where only "python3" will exist in default installations. (Note that adding "python2" to the search list doesn't affect the above argument, because those installations won't have that either.) Now, about RHEL 8. The reason why RHEL 8 doesn't have "python" is explained here: https://developers.redhat.com/blog/2018/11/27/what-no-python-in-rhel-8-beta/. The summary is: They can't decide what "python" should point to and don't want to be stuck with a decision for 10 years that might end up being incompatible with where the rest of the world moves (via a PEP 394 update). That's something we should consider as well. We need to maintain these decisions for about 5 years, but it's quite plausible that significant changes (or explicit decisions not to change anything) will happen within that timeframe. So, for example, if we were to backpatch the search order "python, python2, python3" to PG11 and then in a few years "python" points to "python3", then we'll end up with an effective search order of "python3, python2, python3" which might be confusing and would create weird inconsistencies across different releases of the same operating system distribution. The fewer things we put in the search list, the fewer chances of weird confusion and unexpected behavior we'll have. My suggestion is to either - Change the probe order to python, python3 in master, or - Don't change anything until PEP 394 is updated. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services