I tried to fix these issues in the attached patch. Here, I am attaching an updated patch for the review and testing.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных