Hi,
here is updated patch.
Note that it's rebased on top of logical replication improvements
patches [1] (which still apply fine to my surprise).
It will probably need another rebase once patches from Masahiko Sawada
and Fujii Masao get in.
[1]
https://www.postgresql.org/message-id/42655eb4-6b2e-b35b-c184-509efd6eba10%402ndquadrant.com
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services