Compatibility changes#
Summary#
There are some changes in PGD Version 6.4 that are not compatible with 5.x and other previous versions. For users of 4.x, the version 5.x compatibility changes still apply.
Connection Manager#
PGD 6 introduces a new Connection Manager which replaces the PGD 5’s proxy solution with a tightly integrated approach using a background worker to expose read-write, read-only and http-status network interfaces in PGD. This means that all the old proxy functions were removed, as there are no longer separate PGD-Proxy instances to manage and the connection manager uses group configuration.
Moreover, bdr.proxy_conifg table and bdr.proxy_config_summary
view were removed. You should now use bdr.node_group_config_summary
for the connection manager’s configuration. This also includes all the
other group settings, including routing.
For more details see Connection Manager Authentication .
DDL Locking changes#
There is a new global lock type, ddl_locking = leader that’s used by
PGD Version 6.4 by default instead of the global DML lock. This lock
ensures that a table is exclusively locked on all group leaders (as
opposed to all nodes). LOCK TABLE and TRUNCATE TABLE now use
this new lock type by default (before the default behavior was to not
lock outside of the origin node).
LOCK TABLE now uses DDL lock for ACCESS SHARE , ROW SHARE ,
ROW EXCLUSIVE , SHARE UPDATE EXCLUSIVE and DML lock for
SHARE ROW EXCLUSIVE , EXCLUSIVE , and ACCESS EXCLUSIVE .
This means that SHARE+ blocks DMLs, but lower levels don’t (which is
more closely aligned with how these levels work in Postgres).
LOCK TABLE used to always use DML lock.
Join/part behavior#
Function and node state changes#
For bdr.part_node :
wait_for_completionworks on the local nodethe
forceoption is deprecated and has the same behavior asbdr.drop_node(force:=true)
For bdr.drop_node :
the
cascadeoption was removedforcenow always immediately drops the node locally and assumes previous cascade behavior as well
For bdr.join_node_group :
the
pause_in_standbyoption was removednow whether the node is in standby is determined by
node_kindwhen runningbdr.create_node
A new node state PART_CLEANUP was added, which waits for the group
slot to move past any records relevant to the parting node and cleans up
origin records related to the node.
Sequences conversion#
When creating a PGD cluster, existing Sequences are automatically converted to distributed ones.
Parting a node drops it#
When a node is parted, it is eventually dropped and the node will not be
seen in the PARTED state at the end of the parting. Therefore,
scripts that wait for the node to reach PARTED state may need
change. Parting can also take longer than earlier versions since this
operation waits till the group slot on all crosses of the last
transaction from the parting node to ensure consistency.
Administration function changes#
The
enable_proxy_routingnode group option is nowenable_routing, althoughbdr.alter_node_group_optionstill supports the older syntax for backwards compatibility. The views only show the new name.The already deprecated
bdr.alter_node_group_config()was removed. Usebdr.alter_node_group_option()instead.The
managed_locallyoption inbdr.autopartition()was removed. Only locally managed partitions are now supported. At the same timeap_is_localwas removed frombdr.autopartition_rulescatalog as well.
Other#
Replica identity#
Replica identity defaults to FULL now.
This removes some edge cases in conflict detection between inserts, updates, and deletes across node crashes and recovery.
Run on (all) writes#
Run on (all) writes is now not replicated.
The
bdr.xact_replicateis set tooffby default, reducing possible accidental issues with replication of commands sent via the run on (all) nodes command.Some log messages were reworded to be easier to understand.
Some internal log messages’ log levels were lowered from
LOGtoDEBUGso they may no longer appear in logs.
General UI improvements#
Workers renamed to not contain ‘pglogical’
Previously deprecated configuration parameters (GUCs) now removed (this includes, for example, all the pglogical prefixed GUCs).
Conflicts are logged neither to Postgres log or
conflict_historytable by default
Changes to defaults#
Global lock timeout#
bdr.global_lock_timeout is set to 1 minute by default.
Auto sync#
bdr.enable_auto_sync_reconcile is set to ON by default. This feature
is documented in Relationship to automatic synchronization . It enables changes from a down node to
be synced to all other nodes.