Right, I think there are some interesting things to pursue here. I also had an idea to use logical decoding to get a streaming sample, which would be better randomness than block sampling. At this point that's just an idea, I haven't looked into it seriously.
Regards, Jeff Davis
v15 attached
0001: - fixed an error involving tsvector types - only derive element type if element stats available - general cleanup
0002:
- 002pg_upgrade.pl now dumps before/after databases with --no-statistics. I tried to find out why some tables were getting their relstats either not set, or set and reset, never affecting the attribute stats. I even tried turning autovacuum off for both instances, but nothing seemed to change the fact that the same tables were having their relstats reset.
TODO list:
- decision on whether suppressing stats in the pg_upgrade TAP check is for the best - pg_upgrade option to suppress stats import, there is no real pattern to follow there
- what message text to convey to the user about the potential stats import errors and their remediation, and to what degree that replaces the "you ought to run vacuumdb" message. - what additional error context we want to add to the array_in() imports of anyarray strings