pgd replication show v5.7

Synopsis

The pgd replication show command is used to display the replication status in the EDB Postgres Distributed cluster.

By default, with no options, it produces reports on the following:

  • Node Replication Progress: A matrix of the replication status between nodes.
  • Replication Slots: The replication slots status for each node's slots.
  • Subscriptions: The subscription status for each subscription between nodes.
  • Analytics Replication: The analytics replication status for each node.

Options can be used to restrict the output to any one of the above reports. The --verbose option can be used to increase the detail in the default report to show the LSN and the replication lag for each node's connection to other nodes.

Syntax

pgd replication show [OPTIONS]

Options

The following options are available for the pgd replication show command:

ShortLongDescription
--nodesDisplay only node to node replication status in a matrix format.
--slotsDisplay the replication slots for each node.
--subscriptionsDisplay the subscription status for each subscription between nodes.
--analyticsDisplay the analytics replication status for each node.
-v--verboseDisplay detailed information about the replication status.

See the Global Options for common global options.

--slots

This shows Shows the status of BDR replication slots. Output with the verbose flag gives details such as is slot active, replication state (disconnected, streaming, catchup), and approximate lag.

SymbolMeaning
*ok
~warning (lag > 10M)
!critical (lag > 100M OR slot is 'inactive' OR 'disconnected')
xdown / unreachable
-n/a

In matrix view, sometimes byte lag is shown in parentheses. It is maxOf(WriteLag, FlushLag, ReplayLag, SentLag).

Examples

Display the replication status in the EDB Postgres Distributed cluster

pgd replication show
Output
# Node Replication Progress
Node   kaboom kaftan kaolin
------ ------ ------ ------
kaboom -      *      *     
kaftan *      -      *     
kaolin *      *      -     

# Replication Slots
Group Name   Origin Node Target Node Slot Name                      Active State     Write Lag Replay Lag Sent Lag Bytes Write Lag Bytes Replay Lag Bytes
------------ ----------- ----------- ------------------------------ ------ --------- --------- ---------- -------------- --------------- ----------------
dc1_subgroup kaboom      kaftan      bdr_bdrdb_democluster15_kaftan t      streaming 00:00:00  00:00:00   0              0               0               
dc1_subgroup kaboom      kaolin      bdr_bdrdb_democluster15_kaolin t      streaming 00:00:00  00:00:00   0              0               0               
dc1_subgroup kaftan      kaboom      bdr_bdrdb_democluster15_kaboom t      streaming 00:00:00  00:00:00   0              0               0               
dc1_subgroup kaftan      kaolin      bdr_bdrdb_democluster15_kaolin t      streaming 00:00:00  00:00:00   0              0               0               
dc1_subgroup kaolin      kaboom      bdr_bdrdb_democluster15_kaboom t      streaming 00:00:00  00:00:00   0              0               0               
dc1_subgroup kaolin      kaftan      bdr_bdrdb_democluster15_kaftan t      streaming 00:00:00  00:00:00   0              0               0               

# Subscriptions
Origin Node Target Node Last Applied Tx Timestamp      Last Applied Tx Age Subscription Status
----------- ----------- ------------------------------ ------------------- -------------------
kaboom      kaftan      2025-02-21 19:18:12.661520 UTC 00:00:18.616        replicating        
kaboom      kaolin      2025-02-21 19:18:12.661520 UTC 00:00:18.939        replicating        
kaftan      kaboom      2025-02-21 19:18:12.658069 UTC 00:00:18.787        replicating        
kaftan      kaolin      2025-02-21 19:18:12.658069 UTC 00:00:18.943        replicating        
kaolin      kaboom      2025-02-21 19:18:12.663201 UTC 00:00:18.782        replicating        
kaolin      kaftan      2025-02-21 19:18:12.663201 UTC 00:00:18.614        replicating        

# Analytics Replication Progress
Origin Node Replicating Node Replicated LSN Last Updated
----------- ---------------- -------------- ------------

Display only the node to node replication status in a matrix format

pgd replication show --nodes
Output
Node   kaboom kaftan kaolin
------ ------ ------ ------
kaboom -      *      *     
kaftan *      -      *     
kaolin *      *      -