Skip to content

Detect and invoke snapshot stream merge in the main replication "loop"

This is slightly related to SendStandbyStatusUpdate should be called period... (#82 - closed)

Problem:

We currently invoke merging the snapshot NATS stream to the main NATS stream when the next logical replication message is received. This works for most cases however, nothing guarantees that a logical replication message will arrive any time soon. For older partitions in a partitioned table we won't see inserts at all.

Idea:

Since when stream is merged all LR processing stops, we can might be able to move the merge status monitor goroutine into the main loop:

Edited by Adam Hegyi