Skip to content

Commit

Permalink
Supporting edits and tweaks for links
Browse files Browse the repository at this point in the history
Signed-off-by: Dj Walker-Morgan <[email protected]>
  • Loading branch information
djw-m committed Sep 27, 2023
1 parent be4846f commit 2b127d5
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 5 deletions.
4 changes: 2 additions & 2 deletions product_docs/docs/pgd/5/choosing_server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following table lists features of EDB Postgres Distributed that are dependen
| [Granular DDL Locking](ddl/#ddl-locking-details) | Y | Y | Y |
| [Streaming of large transactions](transaction-streaming/) | v14+ | v13+ | v14+ |
| [Distributed sequences](sequences/#pgd-global-sequences) | Y | Y | Y |
| [Subscribe-only nodes](nodes/#physical-standby-nodes) | Y | Y | Y |
| [Subscribe-only nodes](node_management/physical_standby_nodes) | Y | Y | Y |
| [Monitoring](monitoring/) | Y | Y | Y |
| [OpenTelemetry support](monitoring/otel/) | Y | Y | Y |
| [Parallel apply](parallelapply) | Y | Y | Y |
Expand All @@ -28,7 +28,7 @@ The following table lists features of EDB Postgres Distributed that are dependen
| [Commit At Most Once (CAMO)](durability/camo/) | N | Y | 14+ |
| [Eager Conflict Resolution](consistency/eager/) | N | Y | 14+ |
| [Lag Control](durability/lag-control/) | N | Y | 14+ |
| [Decoding Worker](nodes/#decoding-worker) | N | 13+ | 14+ |
| [Decoding Worker](node_management/decoding_worker) | N | 13+ | 14+ |
| [Lag tracker](monitoring/sql/#monitoring-outgoing-replication) | N | Y | 14+ |
| Missing partition conflict | N | Y | 14+ |
| No need for UPDATE Trigger on tables with TOAST | N | Y | 14+ |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Createing and joining PGD groups
title: Creating and joining PGD groups
navTitle: Creating and joining PGD groups
---

Expand Down
11 changes: 9 additions & 2 deletions product_docs/docs/pgd/5/node_management/decoding_worker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ sending and receiving data. Taken together, these changes reduce the CPU
overhead of larger PGD groups and also allow higher replication throughput
since the WAL sender process now spends more time on communication.

## Enabling

`enable_wal_decoder` is an option for each PGD group, which is currently
disabled by default. You can use [`bdr.alter_node_group_config()`](reference/nodes-management-interfaces/#bdralter_node_group_config) to enable or
disable the decoding worker for a PGD group.
Expand All @@ -24,6 +26,8 @@ periodically. The interval between two consecutive cleanups is controlled by
[`bdr.lcr_cleanup_interval`](/pgd/latest/reference/pgd-settings#bdrlcr_cleanup_interval), which defaults to 3 minutes. The cleanup is
disabled when [`bdr.lcr_cleanup_interval`](/pgd/latest/reference/pgd-settings#bdrlcr_cleanup_interval) is zero.

## Disabling

When disabled, logical decoding is performed by the WAL sender process for each
node subscribing to each node. In this case, no LCR files are written.

Expand All @@ -39,8 +43,8 @@ decoding worker for the PGD group and set these GUCs to `true` on each of the no
- [`bdr.receive_lcr`](/pgd/latest/reference/pgd-settings#bdrreceive_lcr) &mdash; When `true` on the subscribing node, it requests WAL
sender on the publisher node to use LCRs if available.

## Notes

!!! Note Notes
As of now, a decoding worker decodes changes corresponding to the node where it's
running. A logical standby is sent changes from all the nodes in the PGD group
through a single source. Hence a WAL sender serving a logical standby can't
Expand All @@ -52,6 +56,9 @@ a WAL sender serving a subscriber-only node can use LCRs.
Even though LCRs are produced, the corresponding WALs are still retained similar
to the case when a decoding worker isn't enabled. In the future, it might be possible
to remove WAL corresponding the LCRs, if they aren't otherwise required.
!!!

## LCR file names

For reference, the first 24 characters of an LCR file name are similar to those
in a WAL file name. The first 8 characters of the name are all '0' right now.
Expand All @@ -69,4 +76,4 @@ The set of last 16 characters represents the
subsegment number in an LCR segment. Each LCR file corresponds to a
subsegment. LCR files are binary and variable sized. The maximum size of an
LCR file can be controlled by `bdr.max_lcr_segment_file_size`, which
defaults to 1 GB.
defaults to 1 GB.
55 changes: 55 additions & 0 deletions product_docs/docs/pgd/5/node_management/viewing_topology.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ TODO: Include details of equivelant pgd cli commands

## Listing PGD groups

### Using [pgd-cli](../pgd-cli)

Use the `show-groups` command to list all groups in the PGD cluster:

```shell
pgd show-groups
```
```console
Group Group ID Type Parent Group Location Raft Routing Write Leader
----- -------- ---- ------------ -------- ---- ------- ------------
bdrgroup 1360502012 global true false
group_a 3618712053 data bdrgroup a true true bdr-a1
group_b 402614658 data bdrgroup b true true bdr-b1
group_c 2808307099 data bdrgroup c false false
group_so 2123208041 subscriber-only bdrgroup c false false
```

### Using SQL

The following simple query lists all the PGD node groups of which the current
node is a member. It currently returns only one row from
[`bdr.local_node_summary`](/pgd/latest/reference/catalogs-visible#bdrlocal_node_summary).
Expand All @@ -31,6 +50,42 @@ JOIN bdr.node_group g USING (node_group_name);

## Listing nodes in a PGD group

### Using [pgd-cli](../pgd-cli)

Use the `show-nodes` command to list all nodes in the PGD cluster:

```shell
pgd show-nodes
```
```console
Node Node ID Group Type Current State Target State Status Seq ID
---- ------- ----- ---- ------------- ------------ ------ ------
bdr-a1 3136956818 group_a data ACTIVE ACTIVE Up 6
bdr-a2 2133699692 group_a data ACTIVE ACTIVE Up 3
logical-standby-a1 1140256918 group_a standby STANDBY STANDBY Up 9
witness-a 3889635963 group_a witness ACTIVE ACTIVE Up 7
bdr-b1 2380210996 group_b data ACTIVE ACTIVE Up 1
bdr-b2 2244996162 group_b data ACTIVE ACTIVE Up 2
logical-standby-b1 3541792022 group_b standby STANDBY STANDBY Up 10
witness-b 661050297 group_b witness ACTIVE ACTIVE Up 5
witness-c 1954444188 group_c witness ACTIVE ACTIVE Up 4
subscriber-only-c1 2448841809 group_so subscriber-only ACTIVE ACTIVE Up 8
```

Use `grep` with the group name to filter the list to a specific group:

```shell
pgd show-nodes | grep group_b
```
```console
bdr-b1 2380210996 group_b data ACTIVE ACTIVE Up 1
bdr-b2 2244996162 group_b data ACTIVE ACTIVE Up 2
logical-standby-b1 3541792022 group_b standby STANDBY STANDBY Up 10
witness-b 661050297 group_b witness ACTIVE ACTIVE Up 5
```

### Using SQL

You can extract the list of all nodes in a given node group (such as `mygroup`)
from the [`bdr.node_summary`](/pgd/latest/reference/catalogs-visible#bdrnode_summary)` view as shown in the following
example:
Expand Down

0 comments on commit 2b127d5

Please sign in to comment.