From a5ea88d590dcc9b66bcb972e4e8c5fb8a1da84ff Mon Sep 17 00:00:00 2001 From: Dj Walker-Morgan Date: Wed, 27 Sep 2023 11:59:53 +0100 Subject: [PATCH] Supporting edits and tweaks for links Signed-off-by: Dj Walker-Morgan --- product_docs/docs/pgd/5/choosing_server.mdx | 4 +- .../node_management/creating_and_joining.mdx | 2 +- .../pgd/5/node_management/decoding_worker.mdx | 11 +++- .../5/node_management/viewing_topology.mdx | 55 +++++++++++++++++++ 4 files changed, 67 insertions(+), 5 deletions(-) diff --git a/product_docs/docs/pgd/5/choosing_server.mdx b/product_docs/docs/pgd/5/choosing_server.mdx index ae7cdc72734..3fb171595cc 100644 --- a/product_docs/docs/pgd/5/choosing_server.mdx +++ b/product_docs/docs/pgd/5/choosing_server.mdx @@ -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 | @@ -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+ | diff --git a/product_docs/docs/pgd/5/node_management/creating_and_joining.mdx b/product_docs/docs/pgd/5/node_management/creating_and_joining.mdx index f682a595ee3..14614e07094 100644 --- a/product_docs/docs/pgd/5/node_management/creating_and_joining.mdx +++ b/product_docs/docs/pgd/5/node_management/creating_and_joining.mdx @@ -1,5 +1,5 @@ --- -title: Createing and joining PGD groups +title: Creating and joining PGD groups navTitle: Creating and joining PGD groups --- diff --git a/product_docs/docs/pgd/5/node_management/decoding_worker.mdx b/product_docs/docs/pgd/5/node_management/decoding_worker.mdx index 3660689477f..cff5494ed9b 100644 --- a/product_docs/docs/pgd/5/node_management/decoding_worker.mdx +++ b/product_docs/docs/pgd/5/node_management/decoding_worker.mdx @@ -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. @@ -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. @@ -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) — 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 @@ -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. @@ -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. \ No newline at end of file +defaults to 1 GB. diff --git a/product_docs/docs/pgd/5/node_management/viewing_topology.mdx b/product_docs/docs/pgd/5/node_management/viewing_topology.mdx index 9cef7328170..8faf7c75ec0 100644 --- a/product_docs/docs/pgd/5/node_management/viewing_topology.mdx +++ b/product_docs/docs/pgd/5/node_management/viewing_topology.mdx @@ -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). @@ -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: