Just to complete the circle on this topic, which I intend to take up again during the next dev cycle, I have captured the current state of my work in a public git repo at <https://gitlab.com/adunstan/postgresnodeng>. This can be cloned and used without having to change the core Postgres code, as shown in the README.
cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com