On Mon, Feb 24, 2025 at 4:33 PM Andres Freund <andres@anarazel.de> wrote:
Hi,
On February 24, 2025 10:30:08 PM GMT+01:00, Corey Huinker <corey.huinker@gmail.com> wrote: >From what I can see, it doesn't. Moreover, the attstattarget array agg is >only done in version 11 and higher, and we need to go as far back as we've >got expression indexes.
I don't think we have to at all. It's perfectly reasonable to add a complicated feature like this only when upgrading from newer versions. I'd go even so far to say that it's a bad idea to support unsupported source versions, because it'll mean we'll practically get very very little testing for those paths but claim to support them.
Anyone still on those versions has some serious barriers to doing an upgrade, downtime probably being the largest of them. Any stats we don't migrate here have to be analyzed later, which is more downtime or time in a degraded state. I'd rather we try to make it easier for them to upgrade, and in this case the risk is small because we're just collecting the attname:attnum pairings for an index, and it's the same SQL that we'd use for modern versions.