ページの先頭行へ戻る
Enterprise Postgres 15 運用ガイド

16.11.2 サーバコマンドを使用する場合

以下の3つの方法があります。

  

16.11.2.1 Fastモードによる停止

pg_ctlコマンドに“-m fast”を指定してインスタンスを停止します。

この方法を実施しても停止が失敗する場合は、“16.11.2.2 Immediateモードによる停止”、または“16.11.2.3 サーバプロセスの強制停止”に従った停止を実施してください。

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

  

16.11.2.2 Immediateモードによる停止

pg_ctlコマンドに“-m immediate”を指定してインスタンスを停止します。

この方法を実施しても停止が失敗する場合は、“16.11.2.3 サーバプロセスの強制停止”に従って停止を行ってください。

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

  

16.11.2.3 サーバプロセスの強制停止

Fastモード、Immediateモードのいずれの方法でも停止できない場合は、pg_ctlコマンドのkillパラメータ、またはkillコマンドを使用してサーバプロセスを強制停止します。

手順を以下に示します。

  

  1. psコマンドを実行します
    なお、“<x>”は、製品のバージョンを示します。

    > 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

    プロセスID(20517)がサーバプロセスになります。

      

  2. サーバプロセスを強制停止します。

    インスタンス管理者で、サーバプロセスの強制停止を行います。

    pg_ctlコマンドの場合
    > pg_ctl kill SIGQUIT 20517
    killコマンドの場合
    > kill -s SIGQUIT 20517