Skip to content

Latest commit

 

History

History
141 lines (122 loc) · 10.2 KB

File metadata and controls

141 lines (122 loc) · 10.2 KB

CLI Functions

You can use CLI functions to create and manage PostgreSQL instances that implement logical replication scenarios and use the Spock and Snowflake extensions.

standalone commands

Command Description
setup Install a pgEdge node (including PostgreSQL, spock, and snowflake-sequences).
upgrade-cli Upgrade pgEdge CLI to latest stable version.

ace module commands

Use commands in this section to invoke the Active Consistency Engine (ace); commands in this module include:

Command Description
ace mtree Use pre-computed table hashes, maintained as Merkle Trees, to achieve a significant speed up over normal-mode table-diff.
ace repset-diff Compare a repset across a cluster and produce a report showing any differences.
ace schema-diff Compare a schema across a cluster and produce a report showing any differences.
ace spock-diff Compare the spock metadata across a cluster and produce a report showing any differences.
ace spock-exception-update Update the Spock exception status for a specified cluster and node.
ace start Start the ACE background scheduler and API.
ace table-diff Compare a table across a cluster and produce a report showing differences, if any.
ace table-repair Repair a table across a cluster by fixing data inconsistencies identified in a table-diff operation.
ace table-rerun Rerun a table diff operation based on a previous diff file.

ace mtree submodule commands

Command Description
ace mtree Builds a new Merkle tree for a table.
ace mtree Initialises the database with necessary objects for Merkle trees.
ace mtree Compares Merkle trees of a table across cluster nodes.
ace mtree Removes Merkle tree objects.
ace mtree Updates an existing Merkle tree.

cluster module commands

Use commands in the cluster module to create and modify a cluster; commands in the cluster module include:

Command Description
cluster json-validate Validate and update a cluster configuration JSON file.
cluster json-create Create a cluster configuration JSON file based on user input.
cluster json-template Create a template for a cluster configuration JSON file.
cluster init Initialize a cluster via cluster configuration JSON file.
cluster list-nodes List all nodes in the cluster.
cluster add-node Add a new node to a cluster.
cluster remove-node Remove a node from a cluster.
cluster replication-begin Add all tables to the default replication set on every node.
cluster replication-check Check and display the replication status for a given cluster.
cluster add-db Add a database to an existing pgEdge cluster.
cluster remove Remove a cluster.
cluster command Run './pgedge' commands on one or all nodes in a cluster.
cluster ssh Establish an SSH session into the specified node of a cluster.
cluster app-install Install a test application on all nodes in the cluster.
cluster app-remove Remove a test application from all nodes in the cluster.
cluster app-concurrent-index Create a concurrent index on a table column in a database.

db module commands

Use commands in this section to configure and control PostgreSQL Databases; commands in this module include:

Command Description
db create Create a database owned by a specific user.
db guc-set Set GUC.
db guc-show Show GUC.
db set-readonly Turn PG read-only mode 'on' or 'off'.
db test-io Use the 'fio' Flexible IO Tester on pg data directory.

localhost module commands

Use commands in this section to easily configure localhost test clusters; commands in this module include:

Command Description
localhost cluster-create Create localhost cluster of N pgEdge nodes on different ports.
localhost cluster-destroy Stop and then nuke a localhost cluster.

service module commands

Use commands in the service module to control CLI installed services; commands in the service module include:

Command Description
service start Start server components.
service stop Stop server components.
service status Display running status of server components.
service restart Stop & then start server components.
service reload Reload server configuration files (without a restart)
service enable Enable a server component to start automatically.
service disable Disable a server component from starting automatically.
service config Configure a component.
service init Initialize a component.

spock module commands

Use commands in this section to invoke spock extension functionality with the CLI; commands in this module include:

Command Description
spock node-create Define a node for spock.
spock node-drop Remove a spock node.
spock node-list Display node table.
spock node-add-interface Add a new node interface.
spock node-drop-interface Delete a node interface.
spock repset-create Define a replication set.
spock repset-alter Modify a replication set.
spock repset-drop Remove a replication set.
spock repset-add-table Add table(s) to a replication set.
spock repset-remove-table Remove table from replication set.
spock repset-add-partition Add a partition to a replication set.
spock repset-remove-partition Remove a partition from a replication set.
spock repset-list-tables List tables in replication sets.
spock sub-create Create a subscription.
spock sub-drop Delete a subscription.
spock sub-alter-interface Modify an interface to a subscription.
spock sub-enable Make a subscription live.
spock sub-disable Put sub on hold & disconnect from provider.
spock sub-add-repset Add a replication set to a subscription.
spock sub-remove-repset Drop a replication set from a subscription.
spock sub-show-status Display the status of the subscription.
spock sub-show-table Show subscription tables.
spock sub-resync-table Resynchronize a table.
spock sub-wait-for-sync Pause until the subscription is synchronized.
spock table-wait-for-sync Pause until a table finishes synchronizing.
spock replicate-ddl Replicate DDL through replication set(s).
spock sequence-convert Convert sequence to snowflake sequence.
spock health-check Check if PG instance is accepting connections.
spock metrics-check Retrieve advanced DB & OS metrics.
spock set-readonly DEPRECATED: use db.set_readonly() instead

um module commands

Use commands in the um module to install, remove, and update installed components; commands in the um module include:

Command Description
um list Display available/installed components.
um update Update with a new list of available components.
um install Install a component.
um remove Uninstall a component.
um upgrade Perform an upgrade to a newer version of a component.
um clean Delete downloaded component files from local cache
um verify-metadata Display component metadata from the local store
um download Download a component into local cache (without installing it).