Using the pg_ctl command for PostgreSQL database operations such as starting and stopping.
search cancel

Using the pg_ctl command for PostgreSQL database operations such as starting and stopping.

book

Article ID: 11050

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction



  I have installed the APM Database on PostgreSQL successfully, but it did not start.

What commands should I try using to restart the database?

Environment

All supported APM releases.

Resolution

  Verify that the PostgreSQL service is running, or restart it if not running.

  Linux/Solaris Steps.

  1. Locate and navigate to the directory that contains the PostgreSQL startup script for your operating system: <APM_Db_Home>/bin/pg_ctl 
     
  2. To check status of the database, run the following command: 
    pg_ctl -D <APM_Db_Home>/data status 
     
  3. To start the database, run the following command: 
    pg_ctl -D <APM_Db_Home>/data -l <APM_Db_Home>/data/pg_log/postmaster.log start 
     
  4. To stop the database, run the following command: 
    pg_ctl -D <APM_Db_Home>/data stop 
     
  5. To restart the database run the following command: 
    pg_ctl -D <APM_Db_Home>/data -l <APM_Db_Home>/data/pg_log/postmaster.log restart

   Windows Steps

To start/stop the PostgreSQL service,

select Control Panel > Administrative Tools > Services > pgsql-<version> - PostgreSQL Server <version>