Hi Surya,
Thanks for the review and sorry for the late reply.
I get a new idea to fix this bug from:
https://www.postgresql.org/message-id/05DEB465-3C99-417E-B7FA-275A28068D90%40yandex-team.ru
Please see the v2 patch for details.
--
Regards,
ChangAo Chen