Skip to content

Why write the replication log to two places? #5116

Answered by nickva
hashtagchris asked this question in General
Discussion options

You must be logged in to vote

The reason is to ensure that if source is replaced (deleted and recreated and possibly populated with new data), the replication job would be able to detect that. Otherwise, it might continue checkpointing and just move on assuming the source data is all replicated to the target, while in fact it won't be any longer.

However, as of a few years ago we started adding an instance_start_time field in db info response:GET http://$server_url/$dbname [1]. It was always 0 before, but now it's a usable db creation unix timestamp value. That value would allow detecting if a source database has likely been recreated: we'd save that in the checkpoint on the target, and then verify if we restart the r…

Replies: 5 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@hashtagchris
Comment options

@hashtagchris
Comment options

@nickva
Comment options

Answer selected by hashtagchris
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants