Add restart support to snapshot#559
Conversation
0c27aae to
3716039
Compare
|
I'm not sure the default behavior of Should we keep the default behavior of |
dimitri
left a comment
There was a problem hiding this comment.
Good idea, some details need attention.
This will drop the existing replication slot and recreates a new one. Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
3716039 to
14cc44f
Compare
| --restart | ||
|
|
||
| When the ``--restart`` option is used, pgcopydb will cleanup the existing | ||
| replication slot and creates a new replication slot and a snapshot. |
There was a problem hiding this comment.
I think this part should answer some high-level user questions, such as: do I risk losing data? which data? when should I use that option?
| { | ||
| log_info("Clean-up replication setup, per --restart"); | ||
|
|
||
| if (!stream_cleanup_databases(©Specs, |
There was a problem hiding this comment.
@dimitri I see this function call also drops replication origin on the target., the snapshot never dealt with the target so far right? I'm not sure we should clean up the origin & sentinel tables as part of this.?
I think this option adds a bit of confusion around the responsibilities of the subcommand(snapshot, stream cleanup).
This will drop the existing replication slot and recreates a new one.