Skip to content

Commit

Permalink
Filling out content for cli
Browse files Browse the repository at this point in the history
Signed-off-by: Dj Walker-Morgan <dj.walker-morgan@enterprisedb.com>
  • Loading branch information
djw-m committed Jan 27, 2025
1 parent 15015a3 commit 0a2719a
Show file tree
Hide file tree
Showing 30 changed files with 1,257 additions and 34 deletions.
135 changes: 135 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/assess/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,140 @@ title: pgd assess
navTitle: Assess
---

## Synopsis

The `pgd assess` commands are used to assess the suitability of a Postgres server instance for migration to the EDB Postgres Distributed cluster.

The command must be run with a DSN that connects to the Postgres server instance that you want to assess. The command will check the Postgres server instance for compatibility with the EDB Postgres Distributed cluster, and will provide a report on the compatibility of the Postgres server instance.

## Options

The assess command has no command specific options.

See also [Global Options](../index#global-options).

Check failure on line 16 in product_docs/docs/pgd/5/cli/command_ref/assess/index.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: ../index#global-options (/pgd/5/cli/command_ref/index)

## Example

```bash
pgd assess
__OUTPUT__
Multiple Databases
------------------
Multiple databases cannot be part of the same PGD cluster, it's possible to
create a separate PGD cluster for each database, but it's not recommended.
See https://www.enterprisedb.com/docs/pgd/latest/planning/limitations/ for
details.

Result: Compatible, found only one user database


Sequences
---------
PGD uses distributed sequences, two types are supported, see -
https://www.enterprisedb.com/docs/pgd/latest/sequences/ for details.

Existing sequences need to be converted to distributed sequences using the
following commands:

- SELECT bdr.alter_sequence_set_kind('public.quicktest_id_seq', 'galloc')

Result: Needs conversion to distributed sequences


Tables with Multiple Unique Indexes
-----------------------------------
Tables with multiple unique indexes may result in
"multiple_unique_conflicts" conflict, which can be problem when
using PGD as active-active system with concurrent workloads,
see https://www.enterprisedb.com/docs/pgd/latest/conflict-
management/conflicts/02_types_of_conflict/ for details.

Result: Compatible, no tables with multiple unique indexes found


Materialized Views
------------------
Materialized views are supported by PGD, however DDL commands
on them (CREATE, ALTER, DROP, REFRESH) are not replicated, see
https://www.enterprisedb.com/docs/pgd/latest/ddl/ddl-command-handling/ for
details.

Result: Compatible, no materialized views found


EPAS Queue Tables
-----------------
EPAS Queue Tables are not replicated by PGD, so they only work on per node
basis.

Result: Compatible, no EPAS Queue Tables found


LOCK TABLE Usage
----------------
LOCK TABLE is not replicated by default by PGD, if you need distributed
LOCK TABLE support, enable "bdr.lock_table_locking" on all nodes, see
https://www.enterprisedb.com/docs/pgd/latest/reference/pgd-settings/ for
details.

Result: requires static code analysis, could not analyze LOCK TABLE usage
with pg_stat_statements


DDL Command Usage
-----------------
There are some limitations in DDL command handling in PGD, see
https://www.enterprisedb.com/docs/pgd/latest/ddl/ddl-command-handling/ for
details.

Result: Cannot be checked automatically at this time, requires code analysis


LISTEN/NOTIFY Usage
-------------------
PGD is compatible with LISTEN/NOTIFY, however it works on each node
separately, just like with standard Postgres

Result: Could not analyze LISTEN/NOTIFY usage with pg_stat_statements


Row-Level Lock Usage
--------------------
Row-level locks are not replicated by default by PGD, and as such don't work
as concurrency protection across nodes, and conflict resolution will be used
instead, see https://www.enterprisedb.com/docs/pgd/latest/appusage/behavior/
for details.
Result: Requires static code analysis, could not analyze row-level locking
commands using pg_stat_statements
Advisory Lock Usage
-------------------
Advisory locks are not replicated by PGD, global
advisory lock functionality is provided instead, see
https://www.enterprisedb.com/docs/pgd/latest/reference/functions/#global-
advisory-locks for details.
Result: Requires static code analysis, could not analyze advisory lock
commands using pg_stat_statements
Large Objects
-------------
Large objects are not replicated by PGD, you can
still use "bytea" and other data types normally, see
https://www.enterprisedb.com/docs/pgd/latest/appusage/behavior/ for details.
Result: Compatible, no large objects found
Trigger/Reference Privileges
----------------------------
PGD enforces stricter access control rules on triggers and reference
columns. See https://www.enterprisedb.com/docs/pgd/latest/security/access-
control/#triggers for details.
Result: Compatible, no triggers with incompatible privileges found
```
37 changes: 36 additions & 1 deletion product_docs/docs/pgd/5/cli/command_ref/cluster/show.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,41 @@ The following table lists the options available for the `pgd events show` comman
| | --summary | Only show cluster summary information. |
| | --health | Only show cluster health information. |

Only one of the above options can be specified at a time.
Only one of the above options can be specified at a time.

See also [Global Options](../index#global-options).

Check failure on line 28 in product_docs/docs/pgd/5/cli/command_ref/cluster/show.mdx

View workflow job for this annotation

GitHub Actions / check-links

pathCheck

invalid URL path: ../index#global-options (/pgd/5/cli/command_ref/index)

## Examples

### Display the cluster information

```shell
pgd cluster show
__OUTPUT__
# Summary
Group Name Parent Group Group Type Node Name Node Kind
---------- ------------ --------------- ---------- ---------------
pgd global
dc1 pgd data node-one data
dc1 pgd data node-three data
dc1 pgd data node-two data
sogroup1 pgd subscriber-only sonode-one subscriber-only
sogroup1 pgd subscriber-only sonode2 subscriber-only

# Health
Check Status Message
----------------- ------ -----------------------------------------------
Connections Ok All BDR nodes are accessible
Raft Ok Raft Consensus is working correctly
Replication Slots Ok All PGD replication slots are working correctly
Clock Skew Ok Clock drift is within permissible limit
Versions Ok All nodes are running the same PGD version

# Clock Drift
Reference Node Node Name Clock Drift
-------------- ---------- -----------
node-one node-two *
node-one node-three *
node-one sonode-one *
node-one sonode2 *
```
196 changes: 196 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/cluster/verify.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,199 @@ The following table lists the options available for the `pgd events show` comman
With no option set, both setting and arch are verified by default and output is not verbose.

## Examples

### Verify the cluster settings and architecture

```shell
pgd cluster verify
__OUTPUT__
# Architecture

Cluster has data nodes
----------------------
Cluster must have at least one data node

Result: Ok


Witness nodes per group
-----------------------
Each data group has at most one witness node

Result: Ok


Witness-only groups
-------------------
Cluster has at most one witness-only group

Result: Ok


Data nodes per group
--------------------
Each data group has at least one data node

Result: Ok


Empty groups
------------
There are no empty groups

Result: Ok


# Settings

max_prepared_transactions
-------------------------
The maximum number of prepared transactions that can be active in parallel.
Needed for CAMO and GROUP COMMIT features to work.

Result: Ok


bdr.raft_group_max_connections
------------------------------
The maximum number of Raft connections that can be made in a BDR cluster.
Effectively limits how many nodes can exist in the cluster.

Result: Ok


bdr.standby_slot_names
----------------------
Replication slot names that changes must be replicated to before any other
nodes can receiver changes.

Result: Ok


bdr.writers_per_subscription
----------------------------
The number of writers that can be attached to a single subscription. This
setting is used to limit the number of parallel writers that can be attached
to a single subscription.

Result: Ok


bdr.standby_slots_min_confirmed
-------------------------------
The minimum number of bdr.standby_slot_names slots that must be confirmed
before a node can receive changes.

Result: Ok


max_connections
---------------
The maximum number of client connections that can be made to the database.

Result: Ok


wal_level
---------
The level of information written to the WAL. BDR requires "logical" WAL level.

Result: Ok


bdr.start_workers
-----------------
This setting controls whether PGD workers are started. Without this PGD is not
able to work. Should be only disabled internally by PGD or PGD CLI.

Result: Ok


bdr.xact_replication
--------------------
Controls whether transactions are replicated.

Result: Ok


bdr.ddl_locking
---------------
Whether DDL locking is enabled. DDL locking serializes DDL locks across the
cluster and ensures that DML which conflicts with DDL is blocked during the
DDL execution.

Result: Ok


bdr.max_writers_per_subscription
--------------------------------
The maximum number of writers that can be attached to a single subscription.
This setting sets upper limit for bdr.writers_per_subscription.

Result: Ok


max_replication_slots
---------------------
The maximum number of replication slots that can exist at the same time. Also
maximum number of origins that can exist at the same time. Must be high enough
for PGD to work.

Result: Ok


max_worker_processes
--------------------
The maximum number of background processes that can be registered at the same
time. PGD uses several background processes to function.

Result: Ok


track_commit_timestamp
----------------------
Controls whether the commit timestamp tracking is enabled. BDR requires this
to function.

Result: Ok


bdr.role_replication
--------------------
Controls whether the role and user related commands are replicated.

Result: Ok


max_wal_senders
---------------
The maximum number of WAL senders that can ber running at the same time. Must
be high enough for PGD to work.

Result: Ok


shared_preload_libraries
------------------------
A list of shared libraries that are preloaded into each backend. BDR must be
one of them.

Result: Ok


bdr.replay_progress_frequency
-----------------------------
The frequency at which replay progress is updated. This setting controls how
often the replay progress is updated in the bdr.replication_progress table via
Raft. This table is used to determine how much WAL needs to be kept.

Result: Ok


bdr.accept_connections
----------------------
Whether the node accepts incoming replication connections from other PGD
nodes. Should only be disabled for internal use by PGD and PGD CLI.

Result: Ok
```
Empty file.
Empty file.
14 changes: 14 additions & 0 deletions product_docs/docs/pgd/5/cli/command_ref/commit-scope/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: pgd commit-scope
navTitle: Commit Scope
---

The `pgd commit-scope` commands are used to display and manage the commit scopes in the EDB Postgres Distributed cluster.

## Subcommands

- [show](show): Show information about a commit scope.
- [create](create): Create a commit scope.
- [update](update): Update a commit scope.
- [drop](drop): Drop a commit scope.

Loading

0 comments on commit 0a2719a

Please sign in to comment.