OK, this is not a regression, but a combination of things:
- in 14, it is searching all partitions, but is fast enough that I never noticed (log_min_duration is 1s)
- in 15, at first try it took 30s for JIT, oops
- with that turned off, performance was still really bad
- statistics were not properly updated after the upgrade to 15
- and a big jump was made in a monotonically increasing serial being searched on
- instead of 142 index scans, 141 returning 0, and 1 returning a few rows, we got 142 seq scans
- problem fixed itself while I was still figuring it all out, because of normal vacuum thresholds