1-4 looks good to me, with one question: +#define MASK_BITS ((uintptr_t) 0x55aa55aa55aa55aa) Won't this cause a warning in 32 bit builds? (0x55aa55aa definitely should work in both?)
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных