bdr: Replace GUC-based connections with SQL and tables
authorCraig Ringer <craig@2ndquadrant.com>
Sat, 7 Feb 2015 11:54:17 +0000 (00:54 +1300)
committerAndres Freund <andres@anarazel.de>
Thu, 12 Feb 2015 09:16:58 +0000 (10:16 +0100)
commita68dbf5691a1d28e67ecbce0f0135bff0c799adb
tree8e0dfee4cd34a3577ade088c15dc2e70dbfcba38
parentcc41d1da8674145c2d96cda97bdb5ea00b711d2c
bdr: Replace GUC-based connections with SQL and tables

BDR's configuration interface and the related internals have been mostly
rewritten so that GUCs are not used for specifying bdr connections.

The bdr.connectons GUC and bdr.<nodename>_dsn etc are removed by this
commit. Use of these settings will now emit warnings in the server error
log.

Upgrades to the new version must be performed with manual steps covered
in the documentation. Simply replacing the binaries is not sufficient.

Major changes:

* There is only one static worker, a new bdr_supervisor worker

* The supervisor decides which databases to start per-db workers
  for by examining each database for a 'bdr' security label

* per-db workers scan a new bdr.bdr_connections table to decide
  which nodes to launch apply workers for.

* apply workers look up bdr.bdr_connections to get connection
  info instead of checking GUCs

* Explicit creation of the first node is now required with
  bdr.bdr_group_create(...)

* New nodes must be joined with an SQL level bdr.bdr_group_join(...)
  call.
42 files changed:
Makefile.in
bdr.c
bdr.control
bdr.h
bdr_apply.c
bdr_catalogs.c
bdr_common.c [new file with mode: 0644]
bdr_conflict_logging.c
bdr_executor.c
bdr_init_copy.c
bdr_init_replica.c
bdr_internal.h
bdr_isolationregress.conf
bdr_label.c
bdr_label.h
bdr_locks.c
bdr_locks.h
bdr_output.c
bdr_perdb.c
bdr_regress_bdr.conf
bdr_relcache.c
bdr_seq.c
bdr_supervisor.c [new file with mode: 0644]
bdr_upgrade.c [new file with mode: 0644]
expected/ddl/create.out
expected/init.out
expected/init_bdr.out [new file with mode: 0644]
expected/init_udr.out [new file with mode: 0644]
expected/isolation/init.out [new file with mode: 0644]
expected/isolation/waitforstart.out [deleted file]
expected/upgrade.out
extsql/bdr--0.8.0.sql
extsql/bdr--0.9.0.0--0.9.0.1.sql [new file with mode: 0644]
scripts/bdr_initial_load.in
specs/isolation/init.spec [new file with mode: 0644]
specs/isolation/waitforstart.spec [deleted file]
sql/ddl/create.sql
sql/init.sql
sql/init_bdr.sql [new file with mode: 0644]
sql/init_udr.sql [new file with mode: 0644]
sql/upgrade.sql
sql/upgrade_sim_0800.sql [new file with mode: 0644]