IBM Support

How to gracefully stop postgresql database for PHPC when database service stop operation fails?

Question & Answer


Question

Once you run "#service postgresql stop" and fails, how to safely stop the postgresql database? The below is detail description: service postgresql stop Stopping postgresql service: [FAILED]

Cause

When database operation is hunging, the command of "#service postgresql stop" will can't stop the postgresql database.

Answer

When the command of "service postgresql stop", to gracefully stop postgresql, the pg_ctl with parameter "immediate" can be used to quit without complete shutdown.
1. Stop the HPC services
pcmadmin service stop --group ALL
2. Stop postgresql database by pg_ctl,
#sudo su - postgres
>pg_ctl stop -D /var/lib/pgsql/data -m immediate
3. Start postgresql database by pg_ctl
>pg_ctl start -D /var/lib/pgsql/data -m fast
4. Start the HPC services
#pcmadmin service start --group ALL

[{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Database-Postgres","Platform":[{"code":"PF016","label":"Linux"}],"Version":"4.2","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
IBM Spectrum Cluster Foundation

Software version:
4.2

Operating system(s):
Linux

Document number:
706007

Modified date:
23 June 2018

UID

isg3T1026498