Open tkaemming opened 9 years ago
So I want to make sure I understand the issue here. The sequence of events is as follows:
users
table.users
to a replication set, aiming to replicate my changes out of the database.users
mutations from that point on only are replicated out.I don't follow this sentence though:
[T]he consistent snapshot exposed to replication targets will be broken. (Technically, only replication targets that were bootstrapped before the content was added to the table would be corrupted, but it's probably better to just unilaterally prevent the behavior for until a better solution exists.)
I feel like I may be conflating two ideas of a "replication set," one dealing with the top-level replication set in PGShovel, as well as the "replication" tooling that is being worked on in the replication branch. So I'm a little confused exactly what this is saying...
This is a stopgap until #15 to prevent accidentally corrupting the data set on replication targets. If a table has existing content before it is added to the replication set, that initial data set will never be replicated and the consistent snapshot exposed to replication targets will be broken. (Technically, only replication targets that were bootstrapped before the content was added to the table would be corrupted, but it's probably better to just unilaterally prevent the behavior for until a better solution exists.)
This will likely require an exclusive lock on the table during the configuration change, running
COUNT(*)
on the table, and only allowing the configuration change to continue if there are 0 existing rows.