The slot size has grown up to be quite large due to inserts into tables not part of the mirror.
Publication will filter these messages but wal decoder has to still decode these.
START_REPLICATION will be waiting on WALRead / IO wait events as it might take a long time for us to get to messages that are part of the mirror's publication.
PullRecords will hit PEERDB_CDC_IDLE_TIMEOUT_SECONDS and return empty, and we will start all over again.
So far we have mitigated these manually by increasing PEERDB_CDC_IDLE_TIMEOUT_SECONDS to be of a higher value, but this requires manual intervention and also increases latency in cases where we wouldn't want to wait for that long.
To address this issue one approach I can think of is:
Wait for at least one record to come in, otherwise there isn't anything to Push.
The one caveat is a keep-alive message, the server can send these and ask us to respond back to ensure that the client is alive. In these cases we should send a response.
Consider the following scenario:
START_REPLICATION
will be waiting onWALRead
/IO
wait events as it might take a long time for us to get to messages that are part of the mirror's publication.PullRecords
will hitPEERDB_CDC_IDLE_TIMEOUT_SECONDS
and return empty, and we will start all over again.So far we have mitigated these manually by increasing
PEERDB_CDC_IDLE_TIMEOUT_SECONDS
to be of a higher value, but this requires manual intervention and also increases latency in cases where we wouldn't want to wait for that long.To address this issue one approach I can think of is:
Push
.