Hi,
I can reproduce this on master, and your analysis is right. bound_box()
lets the NaN into the range summary, and then every box operator says
the range cannot match.
You suggested adding a mergeable support function, like inet has. That
works, but it needs a new pg_amproc row, so it cannot go to the back
branches. The same code is in 14 and later.
The attached 0001 fixes bound_box() instead. When an input coordinate is
NaN, the result is infinite on that side. The summary then matches any
query on that axis and the recheck does the rest. Only the NaN axis
becomes lossy, the other axis still prunes.
Existing summaries that hold a NaN stay broken until REINDEX.
0002 adds tests and is optional.
Thanks,
Shihao