0001 -- looks reasonable. One hunk in executor.h changes LockTupleMode to "enum LockTupleMode", but there's no need for that.
AFAIK the only reason to have the struct FooBarData vs. FooBar (ptr) split is so that it's possible to refer to structs without having the full struct definition. I think changing uses of FooBar to "struct FooBarData *" defeats the whole purpose -- it becomes pointless noise, confusing the reader for no gain. I've long considered that the struct definitions should appear in "internal" headers (such as htup_details.h), separate from the pointer typedefs, so that it is the forward struct declarations (and the pointer typedefs, where there are any) that are part of the exposed API for each module, and not the struct definitions. I think that would be much more invasive, though, and it's unlikely to succeed as easily as this simpler approach is. I think MissingPtr is a terrible name. Can we change that while at this? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services