NOTE: the test code is not very DRY. While educational, I spent a decent amount of time with this diff getting up to speed with the replication code, so there is more copy and paste than I would like. I do want to make a few passes to the replication code to clean this up, improve names, etc.
This is based off of https://github.com/disqus/pgshovel/tree/replication, and adds new tests for the new behavior added. Tests include:
NOTE: the test code is not very DRY. While educational, I spent a decent amount of time with this diff getting up to speed with the replication code, so there is more copy and paste than I would like. I do want to make a few passes to the replication code to clean this up, improve names, etc.