Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
I spent some time on the main patch and came up with the following. I think it's in decent shape, but it probably ought to go through another round of both human and LLM review.