su root -c "echo -e 'password'|/opt/vmware/vpostgres/current/bin/psql -h localhost -p 9999 -U pgpool postgres -c \"show pool_nodes\""/usr/local/bin/pcp_recovery_node -h delegateIP -p 9898 -U pgpool -n 0Password:ERROR: executing recovery, execution of command failed at "lst stage"DETAIL: command: "recovery_lst_stage" On the primary server: tail -f /db/data/serverlog
ERROR: requested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removedERROR: requested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removedERROR: requested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removedERROR: requested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removedERROR: requested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removedERROR: requested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removedrequested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removedERROR: function pgpool_recovery(unknown, unknown, unknown, unknown, integer) does not exist at character 8No function matches the given name and argument types. You might need to add explicit type casts.STATEMENT: SELECT pgpool_recovery('recovery_1st_stage', '<delegate_ip>', '/db/data', '5432', 0)ERROR: function pgpool_recovery(unknown, unknown, unknown, unknown, integer) does not exist at character 8HINT: No function matches the given name and argument types. You might need to add explicit type casts. STATEMENT: SELECT pgpool_recovery ('recovery_1st_stage', '<delegate_ip>', '/db/data', '5432', 0)------
The same can be validated the same with with : tail -f /db/data/serverlogHINT: No function matches the given name and argument types. You might need to add explicit type casts.STATEMENT: SELECT pgpool_recovery ('recovery_1st_stage', '<delegate_ip>', '/db/data', '5432', 0)ERROR: relation "pgpool recovery" does not exist at character 15STATEMENT: select * from pgpool recovery;ERROR: function pgpool_recovery (unknown, unknown, unknown, unknown, integer) does not exist at character 8HINT: No function matches the given name and argument types. You might need to add explicit type casts.HINT: No function matches the given name and argument types. You might need to add explicit type casts.
On the standby node: tail -f /db/data/serverlog
LOG: started streaming WAL from primary at 146/48000000 on timeline 6FATAL: could not receive data from WAL stream: ERROR: requested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removed
LOG: started streaming WAL from primary at 146/48000000 on timeline 6FATAL: could not receive data from WAL stream: ERROR: requested WAL segment xxxxxxxxxxxxxxxxxxxxxxxx has already been removed
LOG: received fast shutdown request LOG: aborting any active transactions LOG: shutting down LOG: database system is shut down
pgpool_recovery, pgpool_regclass tables having been removed .Resolution:
Workaround:
------------------------------------------Steps to UNDO The prepare-vidm-patch.sh script------------------------------------------/etc/init.d/pgService start/opt/vmware/vpostgres/current/bin/psql -h localhost -U postgres -d template1 -c "CREATE EXTENSION IF NOT EXISTS pgpool_recovery WITH SCHEMA pg_catalog;"/opt/vmware/vpostgres/current/bin/psql -h localhost -U postgres -d template1 -c "CREATE EXTENSION IF NOT EXISTS pgpool_regclass WITH SCHEMA pg_catalog;"/etc/init.d/NetworkService start/etc/init.d/vpostgres stop/usr/local/bin/pcp_recovery_node -h delegateIP -p 9898 -U pgpool -n node_id Command parameter help -h : The affected host on which the command would be run, Use as is. (delegateIP : This is keyword. Need not be changed with IP. Use as is.) -p : Port on which PCP process accepts connections, which is 9898 -U : The Pgpool user, which is pgpool -n : Node id which needs to be recovered. <node_id> will be the node that is being corrected. This can obtained from 'node_id' column from the show pool_nodes command. pgpool : This is pgpool user. Need not be changed. Use as is. The above command would prompt for a password. Enter Password as "password" if the /usr/local/etc/pgpool.pwd password fails to connect.
Expected responsepcp_recovery_node -- Command Successful