While this code might be useful, whouldn't it be much more valuable to provide hooks into xlog so that we could do non-trigger-based replication? (As well as non-trigger-based materialized views...)
If we're going to do hooks for replication, I think we should look at including xlog. Trigger-based replication is an OLTP performance killer if you're just looking to do async replication.