This stuff sounds pretty nice. However, have a look at this report: https://codecov.io/gh/postgresql-cfbot/postgresql/commit/2aa632dae3066900e15d2d42a4aad811dec11f08
it seems to me that the new code is not tested at all. Shouldn't you add a few more tests? I think 0004 should apply to unpatched master (except for the parts that concern files not in master); sounds like a good candidate for first apply. Then 0001, which seems mostly just refactoring. 0002 and 0003 are the really interesting ones (minus the code removed by 0004). -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services