Top
Enterprise Postgres 17 Operation Guide

17.11.2 Using Server Commands

There are three methods:

17.11.2.1 Stopping the Instance Using the Fast Mode

Specify "-m fast" in the pg_ctl command to stop the instance.

If the instance fails to stop when you use this method, stop the instance as described in "17.11.2.2 Stopping the Instance Using the Immediate Mode" or "17.11.2.3 Forcibly Stopping the Server Process".

Example

> pg_ctl stop -D /database/inst1 -m fast

17.11.2.2 Stopping the Instance Using the Immediate Mode

Specify "-m immediate " in the pg_ctl command to stop the instance.

If the instance fails to stop when you use this method, stop the instance as described in "17.11.2.3 Forcibly Stopping the Server Process".

Example

> pg_ctl stop -D /database/inst1 -m immediate

17.11.2.3 Forcibly Stopping the Server Process

If both the Fast mode and the Immediate mode fail to stop the instance, use the kill command or the kill parameter of the pg_ctl command to forcibly stop the server process.

The procedure is as follows:

  1. Execute the ps command
    Note that "<x>" indicates the product version.

    > ps axwfo user,pid,ppid,tty,command | grep postgres
    fsepuser 19174 18027 pts/1                 \_ grep postgres
    fsepuser 20517     1 ?        /opt/fsepv<x>server64/bin/postgres -D /database/inst1  
    fsepuser 20518 20517 ?         \_ postgres: logger
    fsepuser 20520 20517 ?         \_ postgres: checkpointer
    fsepuser 20521 20517 ?         \_ postgres: background writer
    fsepuser 20522 20517 ?         \_ postgres: walwriter
    fsepuser 20523 20517 ?         \_ postgres: autovacuum launcher
    fsepuser 20524 20517 ?         \_ postgres: archiver
    fsepuser 20525 20517 ?         \_ postgres: logical replication launcher

    The process ID (20517) indicates the server process.

  2. Forcibly stop the server process

    As instance manager, forcibly stop the server process.

    Using the pg_ctl command
    > pg_ctl kill SIGQUIT 20517
    Using the kill command
    > kill -s SIGQUIT 20517