14.1. Upgrading BDR 0.9.x to 1.0

Upgrading BDR 0.9.x to 1.0 may be done without a full outage maintenance window. Each node will need to be restarted, but this can be done with rolling restarts to preserve system availability. Normal loads may continue to run on the nodes, but DDL should be avoided since the global DDL lock may not be acquired while one or more nodes are unreachable.

BDR 1.0.0 cannot join a BDR 0.9.3 group, so upgrades may not be performed by adding new nodes and retiring the old ones. Attempting to join 1.0.0 to a 0.9.3 node will fail.

BDR cannot be downgraded from 1.0.0 to a 0.9.x release since the BDR extension catalogs have changed.

Before or at the same time as upgrading the BDR plugin to 1.0.0, make sure to upgrade bdr-pg to at least 9.4.9. This will be done automatically if you've installed BDR from packages. If you're installing from source, make sure to install the latest bdr-pg/REL9_4_STABLE branch (at least as new as tag bdr-pg/REL9_4_9). Downloading and installing the latest bdr-pg tarball will be fine.

To upgrade 0.9.x to 1.0.0 the extension must be updated and the database server restarted. You may complete the upgrade steps on one node before starting on the next node or perform the steps in parallel across all nodes at once.

It is not necessary to ALTER EXTENSION bdr after starting back up. The BDR extension self-upgrades during startup when a new version is detected. A PostgreSQL restart must be performed; if you attempt to upgrade the extension without a restart BDR will not work because the BDR version loaded in shared_preload_libraries will not match the extension schema and catalogs.

You may install the bdr-patched PostgreSQL and BDR extension updates from source code or packages, just like an initial install. You should use the same method you used for the intial install; don't try to switch from source code to packages or vice versa.

No post-upgrade steps are required.

To check that the upgrade has completed successfully, on each node:

   SELECT bdr.bdr_version(), (SELECT extversion FROM pg_extension WHERE extname = 'bdr') AS extversion

and confirm that both version numbers shown are 1.0.0. Typical output looks like:

   bdr_testdb=# SELECT bdr.bdr_version(), (SELECT extversion FROM pg_extension WHERE extname = 'bdr') AS extversion;
          bdr_version        | extversion 
    1.0.0-2016-08-01-3b785b4 |
   (1 row)