PostgreSQL PCP recovery fails in a VMware Identity Manager environment during patching or cluster remediation.
DOWN in the pgpool status output./usr/local/bin/pcp_recovery_node -h delegateIP -p 9898 -U pgpool -n <node_id>
Execution of command failed at 1st stage - recovery_1st_stageserver.log file reports missing function errors, such as:ERROR: function pgpool_recovery(unknown, unknown, unknown, unknown, unknown, integer) does not exist at character 8
HINT: No function matches the given name and argument types.502 errors, and the OpenSearch service is unavailable.VMware Identity Manager 3.3.7
The PCP recovery process fails due to one or both of the following reasons:
/db/data/recovery_1st_stage) — the file is owned by root instead of postgres.pgpool_recovery, which prevents pgpool from executing the required recovery function.Log in to the affected node and update the ownership of the recovery stage file as shown below:
chown postgres:users /db/data/recovery_1st_stageChange the ownership from root to postgres:users.
Create the pgpool_recovery extension manually if it does not exist on the Primary node:
/opt/vmware/vpostgres/current/bin/psql -h localhost -U postgres -d template1 -c "CREATE EXTENSION IF NOT EXISTS pgpool_recovery WITH SCHEMA pg_catalog;"Restart the PostgreSQL and pgpool services to apply changes:
/etc/init.d/vpostgres restart
/etc/init.d/pgService restartCheck the pgpool node status:
/usr/local/bin/pcp_node_info -h delegateIP -p 9898 -U pgpool -n allAll nodes should now show as UP.
Re-run the PCP recovery process on the primary node, change the node_id value using the step 4 output.
/usr/local/bin/pcp_recovery_node -h delegateIP -p 9898 -U pgpool -n <node_id>Ensure all services are stable and the environment is synchronized:
/etc/init.d/vpostgres status
/etc/init.d/pgService status
/etc/init.d/opensearch statusRun an inventory sync in LCM to validate connectivity.