PostgreSQL Resource fails to come online

book

Article ID: 100048378

calendar_today

Updated On:

Description

Error Message

 

2020/07/28 03:32:38 VCS DBG_5 PostgreSQL:postgres-server:online: Confirming start-up with [267] sec in hand
2020/07/28 03:32:38 VCS DBG_5 PostgreSQL:postgres-server:online:Subroutine called with:
  OnlinePids               [ARRAY(0x169b4c8)]
  BaseDir                  [/usr/bin]
  DataDir                  [/var/lib/pgsql/ok/tablespace/ctl/data/]
  EnvFile                  []
  HostName                 [localhost]
  Port                     [5432]
  PostgreSQLUser           [postgres]
  MonitorReplication       [0]
  ClientAddr               []
  UseFFLM                  [1]
2020/07/28 03:32:38 VCS DBG_5 PostgreSQL:postgres-server:online:Subroutine called with:
  BaseDir                  [/usr/bin]
  DataDir                  [/var/lib/pgsql/ok/tablespace/ctl/data/]
  HostName                 [localhost]
  SrvrDetails              [HASH(0x167e358)]
2020/07/28 03:32:38 VCS DBG_5 PostgreSQL:postgres-server:online: PID folder [/var/VRTSvcs/log/tmp/.VRTSPostgreSQL/postgres-server/PID] exists
2020/07/28 03:32:38 VCS DBG_5 PostgreSQL:postgres-server:online: Got details for monitoring PostgreSQL instance
2020/07/28 03:32:38 VCS DBG_5 PostgreSQL:postgres-server:online:Subroutine called with:
  PidFile                [/var/VRTSvcs/log/tmp/.VRTSPostgreSQL/postgres-server/PID/pidfile.srchstr_1]
  Proc                   [(?^:(/usr/bin/|^)(edb-|)post(gres|master)\b.* -D /var/lib/pgsql/ok/tablespace/ctl/data/\b.*)]
  UID                    [26]
  riPid                  [SCALAR(0x167e250)]
2020/07/28 03:32:38 VCS DBG_5 PostgreSQL:postgres-server:online: PID file [/var/VRTSvcs/log/tmp/.VRTSPostgreSQL/postgres-server/PID/pidfile.srchstr_1] does not exist
2020/07/28 03:32:38 VCS DBG_5 PostgreSQL:postgres-server:online: PostgreSQL instance process details ---
PostgreSQL process [srchstr_1]
PID File     [/var/VRTSvcs/log/tmp/.VRTSPostgreSQL/postgres-server/PID/pidfile.srchstr_1]
Srch Process [(?^:(/usr/bin/|^)(edb-|)post(gres|master)\b.* -D /var/lib/pgsql/ok/tablespace/ctl/data/\b.*)]
FFLM Status  [100]

 

Cause

An additional forward slash included in the resource configuration:

PostgreSQL postgres-server (

 Critical = 0

 HostName = localhost

 BaseDir = "/usr/bin"

 DataDir = "/var/lib/pgsql/ok/tablespace/ctl/data/"

 UseSystemD = 1

 ServiceName = "postgresql.service"

 )

 

In the process search pattern, we look for the exact DataDir attribute value.

(Srch Process [(?^:(/usr/bin/|^)(edb-|)post(gres|master)\b.* -D /var/lib/pgsql/ok/tablespace/ctl/data/\b.*)])

 

The PostgreSQL process however does not include the forward slash.

(postgres 12967     1  0 06:13 ?        00:00:57 /usr/bin/postgres -D /var/lib/pgsql/ok/tablespace/ctl/data -p 5432)

 

This causes process pattern mismatch and the agent is not able to correctly identify the process.

Resolution

Remove the last forward slash from the DataDir definition. i.e.

DataDir = "/var/lib/pgsql/data" 

The fix for this issue will be included in AgentPack release AP3Q2020. 

Issue/Introduction

The PostgreSQL resource immediately faults when brought online.