Checking PostgreSQL database sizes
Use the pgsize action in the cfctl utility to report PostgreSQL database sizes and check thresholds in your IBM® Cyber Fraud deployment.
Before you begin
Ensure that you have the cfctl utility installed. For more information, see Installing the cfctl utility.
Command syntax
cfctl -- pgsize [OPTIONS]
- -c, --cluster <name>
- Report on a specific PostgreSQL cluster
- -d, --db <name>
- Report on a specific database
- -s, --size <threshold>
- Size threshold in format
<number><M|G>; for example, 100M, 5G. - --status
- Run oc cnpg status for the cluster
- --timeout <seconds>
- Timeout in seconds (integer)
- -v
- Verbose output
Examples
Check a specific cluster with a 500 MB threshold:
cfctl -- pgsize -c my-postgres-cluster -s 500M
Run a CloudNativePG (CNPG) status check:
cfctl -- pgsize --status -c my-postgres-cluster
More information
To display extra command information, run the following command:
cfctl show pgsize