I'll stick this into the January commitfest, but I'd like to get it reviewed and committed pretty soon, because there are follow-on patches that need to get done in time for v11 --- in particular, we need to close out the lack of plpgsql support for domains-over-composite.
I didn't checked code - just I did some performance tests and I am thinking so performance is very good.
Master's record type has 50% speed of row type in my test. Patched has +/- same speed.
I see very small slowdown for row type .. about 3% but I think so it is acceptable - I tested some worst case.
Unfortunately - it breaks and very breaks all plpgsql related extensions - pldebug, plprofiler, plpgsql_check. On second hand, there are only few extensions of this kind.