I wrote:
> This is against HEAD but it seems to apply cleanly to v12.
> If you're in a position to rebuild pg_prewarm with the patch,
> please see if it resolves the problem for you.
Eh, sorry about that, patch(1) was willing to apply it but the
result didn't compile :-(. If you want to try local testing,
the version that actually works in v12 is at
https://git.postgresql.org/gitweb/?p=postgresql.git;a=patch;h=f581e5383648913385d3e7789ad9323a3ebfb1d0
regards, tom lane