February 2020
Intermediate to advanced
734 pages
38h 13m
English
Not all DDL statements are equally safe. Say that we want to alter the event column and change the type to TEXT. Watch what happens if we attempt that directly:

The risk here is that certain type conversions would cause a full table rewrite on not just the node being altered, but every node in the cluster. This could lead to a long-duration exclusive lock everywhere, and could eventually cause major problems.
As an alternative, BDR recommends this process:
ALTER TABLE event_log ADD event_new TEXT;
CREATE FUNCTION f_copy_event() RETURNS TRIGGER ...
Read now
Unlock full access