Attached the v1 of your patch.I think that all is safe to switch MemSet by {0}.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных