Hi,
Thanks for the report and the analysis. I have proposed a patch for
this on pgsql-hackers[1]. Please take a look.
Thanks,
Nitin Motiani
Google
[1] https://stream.boxwatch.ru/message-id/flat/CAH5HC97y7PFE6rJh8kVDUszPxGQE030nZvyHu%3DwZT7FBkOV3qA%40mail.gmail.com