Instance Service Control
PgSmart allows managing the database instance, enabling viewing of service status, starting, stopping, restarting, and reloading instance configuration parameters.
pgsmart db [OPERATIONS] [Flags]
Operations:
- Status — Allows checking the current status of the instance service
- Start — Allows starting the database instance service
- Stop — Allows stopping the database instance service
- Restart — Allows restarting the database instance service
- Reload — Allows reloading the configuration parameters of the instance
Flags:
-D, --pgdata=<value>
=> PostgreSQL instance data directory.-M, --pgversion=(11|12|13|14|15)
=> PostgreSQL major version.-a, --agent=<agent>
=> Alias, hostname, or IP of the server where the PgSmart Agent is installed.-h, --help
=> Help.-q, --quiet
=> Non-interactive execution to control your component (status|start|stop|restart|reload).
- Binary and data directories are automatically detected by PgSmart and will be presented for selection if more than one is registered.
- Options
-D
and-M
can be used to directly specify the data directory and PostgreSQL version. - With this information, PgSmart locates the configuration file, extracts the port, and finds the corresponding operating system service.
- Instructions
- Video
pgsmart db status|start|stop|restart|reload -q -a 192.168.56.232 -D /var/lib/pgsql/15/data
Check the status of the database instance
pgsmart db status
pgsmart db status -a <server-id> --pgdata=<PGDATA>
- Instructions
- Video
-
Select the PgSmart Agent or Register a new Agent.
-
Select the PostgreSQL instance Data Directory (PGDATA).
Figure 1 - Database instance service statusnoteTo add a data directory not created by PgSmart, select
Add
.
Stop the database instance service
pgsmart db stop
- Instructions
- Video
-
Select the PgSmart Agent or Register a new Agent.
-
Select the PostgreSQL instance Data Directory (PGDATA).
Figure 2 - Stopping the database instance servicenoteYou can add a data directory not created by PgSmart. To do this, select the
Add
option.
Start the database instance service
pgsmart db start
- Instructions
- Video
-
Select the PgSmart Agent or Register a new Agent.
-
Select the PostgreSQL instance Data Directory (PGDATA).
Figure 3 - Starting the database instance servicenoteYou can add a data directory not created by PgSmart. To do this, select the
Add
option.
Restart the database instance service
pgsmart db restart
- Instructions
- Video
-
Select the PgSmart Agent or Register a new Agent.
-
Select the PostgreSQL instance Data Directory (PGDATA).
Figure 4 - Restarting the database instance servicenoteYou can add a data directory not created by PgSmart. To do this, select the
Add
option.
Reload the configuration parameters of the database instance
pgsmart db reload
- Instructions
- Video
-
Select the PgSmart Agent or Register a new Agent.
-
Select the PostgreSQL instance Data Directory (PGDATA).
Figure 5 - Reloading the database instance service