Finally, the consts are non-appealing for me for functions that are internally used in these files.
I'm curious why you find them non-appealing for non-exposed functions, if you have time to elaborate.
And forgot one: valid_subsequent_attnum()'s duplication is actually adapted IMO, the argument lists could have different assumptions depending on the type of extended stats we are dealing with.
Yeah, I saw that, reviewing the diff-of-diffs just now.