Dear Amit, Zane,
> Okay, I find your case a good reason to add such a check, apart from
> making the code consistent in terms of these checks. One thing I was
> thinking is whether it makes sense to add these checks only in
> --dry-run mode because we normally don't expect such conflicts.
> Otherwise, each such check adds an additional network round-trip.
I think there are two things which can be checked on the command side. One task is
to see the duplication of names. It can be done by connecting to nodes once and
run SQLs. To avoid the round-trip, this could be added for dry run mode.
Another one is slot-name validation. For now, it completely relies on the publisher
side, but it is better to detect earlier. Currently ReplicationSlotValidateName()
does the validation, and we can move it to under common/ directory to allow
server/client side can use the function. This does very fundamental validation
for the string and may be able to do in both dry run/normal mode.
Best regards,
Hayato Kuroda
FUJITSU LIMITED