Fix SWITCH WAL and KEEPALIVE message handling in transform. (#208)
* Fix SWITCH WAL and KEEPALIVE message handling in transform. The SWITCH WAL and KEEPALIVE messages both need to be written out by the transform process as soon as it receives them when in streaming mode. That includes flushing a current transaction out to the apply process and then continuing with that same transaction across the WAL file boundary for instance. In passing, improve error handling on the return value of the fformat() call, so that we stop processing messages early in case of a problem there. Also, refrain from processing keepalive messages unless the server is requesting for a reply. That reduces the amount of KEEPALIVE messages drastically, which is a good thing. Finally, the main follow loop must verify if we reached endpos after the intermediate catchup at mode switching. * Fix snapshot re-use from command line and workdir file. In particular, make sure to remove the file on-disk when we close the snapshot, in order to stop trying to re-use a snapshot that no longer exists. * Fix transform for transactions that spans multiple JSON files.
parent
831cf427
Please register or sign in to comment