Hi, all!
I reported this bug before, and there is a commitfest entry for it:
https://commitfest.postgresql.org/patch/5029/
The attached patches are the latest patches taken from the commitfest.
They seem to need a rebase, but I'd like to see your thoughts on these patches first.
This bug seem to affect a lot of PG major versions.
--
Regards,
ChangAo Chen