Skip to content

Commit

Permalink
Merge pull request #6188 from EnterpriseDB/DOCS-1094-pgd-5-6-release-…
Browse files Browse the repository at this point in the history
…notes-incorrect-default-value-for

Fix default setting and type for force_full_mesh.
  • Loading branch information
djw-m authored Oct 29, 2024
2 parents 90c3542 + 741f26f commit ec12750
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
17 changes: 7 additions & 10 deletions product_docs/docs/pgd/5.6/nodes/subscriber_only/optimizing-so.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ With optimized technology turned off, this election has no effect on the replica

## Group leaders in the optimized topology

With the optimized topology enabled, only the subscriber-only group's group leader receives changes from other data group's write leaders in the cluster and it takes on the responsibility of replicating those changes to the other nodes in the subscriber-only group.
With the optimized topology enabled, only the subscriber-only group's group leader receives changes from other data group's write leaders in the cluster and it takes on the responsibility of replicating those changes to the other nodes in the subscriber-only group.

The other voting nodes choose the group leader from a subscriber-only group's nodes.
Once selected, the whole cluster becomes aware of the change and any data group's write leaders then replicate data only to this newly selected group leader node.
Expand All @@ -54,24 +54,21 @@ The Subscriber-Only node and group form the building block for PGD tree topologi

## Enabling the optimized model

By default, PGD 5.6 forces the full mesh topology. This means the optimization described here is off. To enable the optimized topology, you must have your data-nodes in subgroups, with proxy routing enabled on the sub groups. You can then set the GUC `bdr.force_full_mesh` to `false` to allow the optimization to take effect.
By default, PGD 5.6 forces the full mesh topology. This means the optimization described here is off.
To enable the optimized topology, you must have your data-nodes in subgroups, with proxy routing enabled on the sub groups.
You can then set the GUC [`bdr.force_full_mesh`](/pgd/5.6/reference/pgd-settings#bdrforce_full_mesh) to `off` to allow the optimization to be activated.
Note: This GUC needs to be set in the postgresql.conf file on each data node and each node restarted for the change to take effect.

If any requirements of the optimized topology aren't met, the nodes in a subscriber-only group automatically revert to the full mesh topology. When this happens, you'll find in the logs of the nodes in the cluster messages that explain why the optimization was not possible, such as:

When a data node is part of the top-level node group:

```
```plaintext
node: <nodename> is part of top-level nodegroup: <toplevelgroupname>: changing to full mesh".
```

and when a data group does not have proxy routing enabled:

```
```plaintext
node: <nodename> is in nodegroup: <nodegroupname> that does not have proxy routing: changing to full mesh.
```






1 change: 1 addition & 0 deletions product_docs/docs/pgd/5.6/reference/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
"bdrglobal_keepalives_interval": "/pgd/5.6/reference/pgd-settings#bdrglobal_keepalives_interval",
"bdrglobal_keepalives_count": "/pgd/5.6/reference/pgd-settings#bdrglobal_keepalives_count",
"bdrglobal_tcp_user_timeout": "/pgd/5.6/reference/pgd-settings#bdrglobal_tcp_user_timeout",
"bdrforce_full_mesh": "/pgd/5.6/reference/pgd-settings#bdrforce_full_mesh",
"bdrraft_global_election_timeout": "/pgd/5.6/reference/pgd-settings#bdrraft_global_election_timeout",
"bdrraft_group_election_timeout": "/pgd/5.6/reference/pgd-settings#bdrraft_group_election_timeout",
"bdrraft_response_timeout": "/pgd/5.6/reference/pgd-settings#bdrraft_response_timeout",
Expand Down
2 changes: 2 additions & 0 deletions product_docs/docs/pgd/5.6/reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ The reference section is a definitive listing of all functions, views, and comma
* [`bdr.global_keepalives_interval`](pgd-settings#bdrglobal_keepalives_interval)
* [`bdr.global_keepalives_count`](pgd-settings#bdrglobal_keepalives_count)
* [`bdr.global_tcp_user_timeout`](pgd-settings#bdrglobal_tcp_user_timeout)
### [Topology settings](pgd-settings#topology-settings)
* [`bdr.force_full_mesh`](pgd-settings#bdrforce_full_mesh)
### [Internal settings - Raft timeouts](pgd-settings#internal-settings---raft-timeouts)
* [`bdr.raft_global_election_timeout`](pgd-settings#bdrraft_global_election_timeout)
* [`bdr.raft_group_election_timeout`](pgd-settings#bdrraft_group_election_timeout)
Expand Down
8 changes: 7 additions & 1 deletion product_docs/docs/pgd/5.6/reference/pgd-settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,14 @@ system default. This parameter is ignored for connections made by a Unix-domain
socket. It's supported only on systems where `TCP_USER_TIMEOUT` is available. On
other systems, it has no effect.

## Topology settings

### `bdr.force_full_mesh`

Forces the full mesh topology (default is `on`). When set to `off`, PGD will attempt to use the optimized topology for subscriber-only groups. This setting is only effective when the requirements for the optimized topology are met. See [Optimizing subscriber-only groups](../nodes/subscriber_only/optimizing-so) for more information.

## Internal settings - Raft timeouts

### `bdr.raft_global_election_timeout`

To account for network failures, the Raft consensus protocol implements timeouts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Subgroups inherit settings from their parent group, but can override them if set
</details></td><td>37725</td></tr>
<tr><td>BDR</td><td>5.6.0</td><td><details><summary>Subscriber-only node groups have a leader</summary><hr/><p>Subscriber-only node groups have a leader elected by top-level Raft. There is now a bdr.leader catalog that tracks leadership of subgroups and subscriber-only nodes. If the node that is the leader of a subscriber-only node group goes down or becomes unreachable, a new leader is elected from that group.</p>
</details></td><td></td></tr>
<tr><td>BDR</td><td>5.6.0</td><td><details><summary>Optimized topology for subscriber-only nodes via the leader of the subscriber-only node group</summary><hr/><p>Subscriber-only nodes earlier used to have subscriptions to each data node. Now if optimized topology is enabled, only the leaders of subscriber-only node groups have subscriptions to routing leaders of data node subsgroups. The subscriber only nodegroup leaders route data to other nodes of that subscriber-only nodegroup. This reduces the load on all data nodes so they do not have to send data to all subscriber-only nodes. The GUC <code>bdr.force_full_mesh=false</code> enables this optimized topology. It is off by default.</p>
<tr><td>BDR</td><td>5.6.0</td><td><details><summary>Optimized topology for subscriber-only nodes via the leader of the subscriber-only node group</summary><hr/><p>Subscriber-only nodes earlier used to have subscriptions to each data node. Now if optimized topology is enabled, only the leaders of subscriber-only node groups have subscriptions to routing leaders of data node subsgroups. The subscriber only nodegroup leaders route data to other nodes of that subscriber-only nodegroup. This reduces the load on all data nodes so they do not have to send data to all subscriber-only nodes. The GUC <code>bdr.force_full_mesh=off</code> enables this optimized topology. This GUC variable is on by default, retaining pre-5.6.0 behavior.</p>
</details></td><td></td></tr>
<tr><td>BDR</td><td>5.6.0</td><td><details><summary>Introduce new subscription types to support optimized topology</summary><hr/><p>New subscription types that forward data from all nodes of the subgroup via a routing leader (mode: l), and those that forward data from the entire cluster via a subscriber-only group leader (mode: w) are introduced.</p>
</details></td><td></td></tr>
Expand Down
2 changes: 1 addition & 1 deletion product_docs/docs/pgd/5.6/rel_notes/src/relnote_5.6.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ relnotes:
component: BDR
component_version: 5.6.0
details: |
Subscriber-only nodes earlier used to have subscriptions to each data node. Now if optimized topology is enabled, only the leaders of subscriber-only node groups have subscriptions to routing leaders of data node subsgroups. The subscriber only nodegroup leaders route data to other nodes of that subscriber-only nodegroup. This reduces the load on all data nodes so they do not have to send data to all subscriber-only nodes. The GUC `bdr.force_full_mesh=false` enables this optimized topology. It is off by default.
Subscriber-only nodes earlier used to have subscriptions to each data node. Now if optimized topology is enabled, only the leaders of subscriber-only node groups have subscriptions to routing leaders of data node subsgroups. The subscriber only nodegroup leaders route data to other nodes of that subscriber-only nodegroup. This reduces the load on all data nodes so they do not have to send data to all subscriber-only nodes. The GUC `bdr.force_full_mesh=off` enables this optimized topology. This GUC variable is on by default, retaining pre-5.6.0 behavior.
jira: BDR-5214
type: Enhancement
severity: High
Expand Down

1 comment on commit ec12750

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.