show-replslots#
BDRレプリケーションスロットのステータスを示します。
概要#
BDRレプリケーションスロットのステータスを示します。 verboseフラグを使用した出力は、スロットがアクティブか、レプリケーション状態切断、ストリーミング、キャッチアップ、おおよその遅延などの詳細を提供します。
Symbol |
Meaning |
|---|---|
* |
ok |
~ |
warning (lag > 10M) |
! |
critical (lag > 100M OR slot is 'inactive' OR 'disconnected') |
x |
down / unreachable |
- |
n/a |
マトリックスビューでは、バイトラグが括弧内に表示される場合があります。 maxOf(WriteLag, FlushLag, ReplayLag, SentLag)です。
pgd show-replslots [flags]
オプション#
Flag |
Description |
|---|---|
-v, --verbose |
詳細な出力 |
グローバルオプションについては、 グローバルオプション を参照してください。
例#
ノードがダウンした状態でレプリケーションスロットを表示する#
この例では、3ノードクラスターがあり、 bdr-a1およびbdr-c1がアップし、 bdr-b1がダウンしています。
$ pgd show-replslots
__OUTPUT__
Node bdr-a1 bdr-b1 bdr-c1
- --- ------ ------ ------
bdr-a1 *!(6.6G)*
bdr-b1 x * x
bdr-c1 *!(6.9G)*
またはVerboseモードで
$ pgd show-replslots --verbose
__OUTPUT__
Origin Node Target Node Status (active/state) Write Lag (bytes/duration) Flush Lag (bytes/duration) Replay Lag (bytes/duration) Sent Lag (bytes)
- ---------- ----------- --------------------- -------------------------- -------------------------- --------------------------- ----------------
bdr-a1 bdr-b1 f / disconnected 6.6G / 8 days 02:58:36.243723 6.6G / 8 days 02:58:36.243723 6.6G / 8 days 02:58:36.243723 6.6G
bdr-a1 bdr-c1 t / streaming 0B / 00:00:00 0B / 00:00:00 0B / 00:00:00 0B
bdr-c1 bdr-a1 t / streaming 0B / 00:00:00.000812 0B / 00:00:00.000812 0B / 00:00:00.000812 0B
bdr-c1 bdr-b1 f / disconnected 6.9G / 8 days 02:58:36.004415 6.9G / 8 days 02:58:36.004415 6.9G / 8 days 02:58:36.004415 6.9G
最近再起動したノードでレプリケーションスロットを表示する#
この例では、3ノードクラスターがあり、bdr-b1がダウンしていて、再起動されたばかりです。
$ pgd show-replslots
__OUTPUT__
Node bdr-a1 bdr-b1 bdr-c1
- --- ------ ------ ------
bdr-a1 *!(6.9G)*
bdr-b1 ** *
bdr-c1 *!(5.8G)*
またはVerboseモードで
$ pgd show-replslots --verbose
__OUTPUT__
Origin Node Target Node Status (active/state) Write Lag (bytes/duration) Flush Lag (bytes/duration) Replay Lag (bytes/duration) Sent Lag (bytes)
- ---------- ----------- --------------------- -------------------------- -------------------------- --------------------------- ----------------
bdr-a1 bdr-b1 t / catchup 6.9G / 00:00:00.000778 6.9G / 00:00:00.000778 6.9G / 00:00:00.000778 6.9G
bdr-a1 bdr-c1 t / streaming 0B / 00:00:00.104121 0B / 00:00:00.104133 0B / 00:00:00.104133 0B
bdr-b1 bdr-a1 t / streaming 0B / 00:00:00 0B / 00:00:00 0B / 00:00:00 0B
bdr-b1 bdr-c1 t / streaming 0B / 00:00:00 0B / 00:00:00 0B / 00:00:00 0B
bdr-c1 bdr-a1 t / streaming 6.8K / 00:00:00 6.8K / 00:00:00 6.8K / 00:00:00 6.8K
bdr-c1 bdr-b1 t / catchup 5.5G / 00:00:00.008257 5.5G / 00:00:00.008257 5.5G / 00:00:00.008257 5.5G
すべてのノードが正常に動作している状態でレプリケーションスロットを表示する#
この例では、すべてのノードが起動しており、’streaming’状態である3ノードクラスターがあります。
$ pgd show-replslots
__OUTPUT__
Node bdr-a1 bdr-b1 bdr-c1
- --- ------ ------ ------
bdr-a1 ** *
bdr-b1 ** *
bdr-c1 ** *
またはVerboseモードで
$ pgd show-replslots --verbose
__OUTPUT__
Origin Node Target Node Status (active/state) Write Lag (bytes/duration) Flush Lag (bytes/duration) Replay Lag (bytes/duration) Sent Lag (bytes)
- ---------- ----------- --------------------- -------------------------- -------------------------- --------------------------- ----------------
bdr-a1 bdr-b1 t / streaming 0B / 00:00:00 0B / 00:00:00 0B / 00:00:00 0B
bdr-a1 bdr-c1 t / streaming 0B / 00:00:00 0B / 00:00:00 0B / 00:00:00 0B
bdr-b1 bdr-a1 t / streaming 0B / 00:00:00 0B / 00:00:00 0B / 00:00:00 0B
bdr-b1 bdr-c1 t / streaming 0B / 00:00:00 0B / 00:00:00 0B / 00:00:00 0B
bdr-c1 bdr-a1 t / streaming 0B / 00:00:00 528B / 00:00:00 528B / 00:00:00 0B
bdr-c1 bdr-b1 t / streaming 528B / 00:00:00 528B / 00:00:00 528B / 00:00:00 0B
マルチノードクラスターのレプリケーションスロットを表示する#
この例では、監視ノード、サブスクライバ専用ノード、および2つのロジカルスタンバイを備えた4ノードクラスターがあります。 bdr-a1およびbdr-b1はアップしていて、’streaming’状態です。 bdr-a1は論理スタンバイ-a1に複製しており、 bdr-b1は論理スタンバイ-b1に複製しています。 bdr-a1は、subscriber-only-c1にも複製しています。
注
ロジカルスタンバイのデータは、1つのソースノードからのみ送信されます。他のノードは、ロジカルスタンバイからレプリケーションの変更を受信しません。
サブスクライバー専用ノードは、クラスター内の他のノードからのレプリケーション変更をサブスクライブしますが、他のノードはそこからレプリケーション変更を受信しません
$ pgd show-replslots
__OUTPUT__
Node bdr-a1 bdr-b1 logical-standby-a1 logical-standby-b1 subscriber-only-c1 witness-c1
- --- ------ ------ ------------------ ------------------ ------------------ ----------
bdr-a1 ** *-* *
bdr-b1 ** - ** *
logical-standby-a1 - - * - - -
logical-standby-b1 - - - * - -
subscriber-only-c1 - - - - * -
witness-c1 ** - - **