Improvements to BDR/UDR join sanity checking
This is a set of related changes to the init/join
processes, focused on sanity checks and robustness
when joining nodes.
Introduces extension rev bdr 0.10.0.5.
* Expose bdr_internal_create_truncate_trigger function
to add the bdr truncate_trigger to a table. Use it
from bdr_truncate_trigger_add.
* Use bdr_truncate_trigger_add in bdr_group_join to
create truncate triggers on all existing tables
when BDR gets enabled. Previously we'd fail to
replicate TRUNCATE for tables created before
CREATE EXTENSION bdr; was run.
* Fix broken prototype for bdr_truncate_trigger_add
* In bdr_group_join prohibit enabling BDR where
exclusion constraints exist in the database's
current state. Previously you could get a BDR
db with exclusion constraints and/or a broken
clone by creating a table with exclusion constraints
before enabling BDR.
* In bdr_group_join, warn users if there are
secondary unique indexes on tables, as currently
we can't do last-update-wins conflict handling
on tuples that violate multiple unique constraints.
See issue #95. Still permit join to continue.
* Warn users about missing PRIMARY KEYs, but
permit join to continue, as it's legal to
have no PK on an INSERT-only table.
* In bdr.internal_begin_join, use
bdr_test_replication_connection to test the remote
DSN in replication mode and make sure that pg_hba.conf
permits connection in replication mode. Fixes #94.