This seems very much related to my patch here: https://commitfest.postgresql.org/41/4081/ (yes, somehow the thread got split. I blame outlook) I'll try to review this one soonish.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных