Control of the Instance Service
PgSmart allows you to manage your database cluster, enabling you to view the service status, start, stop, restart and reload instance configurations.
pgsmart cluster [OPERATIONS] [Flags]
OPERATIONS :
- Check the cluster status.
- Initialize the service on the cluster.
- Stop the service on the cluster.
- Restart the service on the cluster.
- Reload the configuration parameters of the instance.
Flags:
- -D, --pgdata=<path>=> Data directory of the PostgreSQL instance.
- -M, --pgversion=(11|12|13|14|15)=> Major version of PostgreSQL.
- -a, --agent=<agent>=> Alias, hostname or IP of the server where a PgAgent is installed.
- -h, --help=> Help.
- -q, --quiet=> Non-interactive execution for control of your component (status|start|stop|restart|reload).
- 
The binary and data directories are automatically identified by PgSmart, which will present them for selection when there is more than one registered. 
- 
The -Dand-Moptions can be used to directly identify the data directory of the instance and the major version of PostgreSQL.
- 
With this information, it is possible to find the configuration file, extract the port, and find the operating system service that relates to it. 
- Instructions
- Video
  pgsmart cluster status|start|stop|restart|reload -q -a 192.168.56.232 -D /var/lib/pgsql/15/data
Check the cluster status
  pgsmart cluster status
  pgsmart cluster status -a <server-id> --pgdata=<PGDATA>
- Instructions
- Video
- 
Select the PgSmart agent or Register a new Agent. 
- 
Select the data directory of the PostgreSQL instance (PGDATA).  Figure 1 - Cluster Statusnote Figure 1 - Cluster StatusnoteTo add a data directory not created by PgSmart, select Add.
Stop the service on the cluster
  pgsmart cluster stop
- Instructions
- Video
- 
Select the PgSmart agent or Register a new Agent. 
- 
Select the data directory of the PostgreSQL instance (PGDATA). :::note Figure 2 - Cluster Stopnote Figure 2 - Cluster StopnoteIt is possible to add a data directory not created by PgSmart. For this, select the option "Add". 
Initialize the service on the cluster
  pgsmart cluster start
- Instructions
- Video
- 
Select the PgSmart agent or Register a new Agent. 
- 
Select the data directory of the PostgreSQL instance (PGDATA).  Figure 3 - Cluster Startnote Figure 3 - Cluster StartnoteIt is possible to add a data directory not created by PgSmart. For this, select the option Add.
Restart the service on the cluster
  pgsmart cluster restart
- Instructions
- Video
- 
Select the PgSmart agent or Register a new Agent. 
- 
Select the data directory of the PostgreSQL instance (PGDATA). 

It is possible to add a data directory not created by PgSmart. For this, select the option "Add".
Reload the configuration parameters of the instance
pgsmart cluster reload
- Instructions
- Video
- Select the PgSmart agent or Register a new Agent.
- Select the data directory of the PostgreSQL instance (PGDATA).
