DP 10.70 PostgreSQL backup hang at "Completed media agent"

  • KM03659337
  • 29-Jun-2020
  • 03-May-2021

Summary

Postgresql with Spanish/Russian language

Error

PostgreSQL backup hang at "Completed media agent"

Cause

Checking the debug, the problem arrives due to "language not understood".
The PosgreSQL responds to the "pg_stop_backup" in Spanish response, expected is English response :

=============================
[ 99]
[ 30] [BackupChangeMode] columnHeaderText0 = NOTICE:  pg_stop_backup completado, todos los segmentos de WAL requeridos han sido archivados
[ 30] [BackupChangeMode] columnHeaderText1 = pg_stop_backup

### Spanish language response from PosgreSQL …

[ 99] 2020-06-07 19:17:34.411 ("$PATH: integ/DBAgent/PostgreSQL/PGDMA/PostgresInterface.cpp $ $Rev$ $Date::                          $":120)
[ 99] ===>> (3) ResponseCheckFor {
[ 99]
[ 30] [ResponseCheckFor] regex search for : NOTICE:  pg_stop_backup complete in the : NOTICE:  pg_stop_backup completado, todos los segmentos de WAL requeridos han sido archivados resulted in : 0

### Expected English text, which the agent attempts to find in the Spanish response : "NOTICE:  pg_stop_backup complete"

[ 99] 2020-06-07 19:17:34.411 ("$PATH: integ/DBAgent/PostgreSQL/PGDMA/PostgresInterface.cpp $ $Rev$ $Date::                          $":131)
[ 99] <<=== (3) }  /* ResponseCheckFor */
[ 99]   RetVal: (bool) FALSE
[ 99]

### And as the string does not match, the response is not seen as correct, and backup fails

[ 99] 2020-06-07 19:17:34.411 ("$PATH: integ/DBAgent/PostgreSQL/PGDMA/PostgresInterface.cpp $ $Rev$ $Date::                          $":120)
[ 99] ===>> (3) ResponseCheckFor {
[ 99]
[ 30] [ResponseCheckFor] regex search for : NOTICE:  pg_stop_backup complete in the : pg_stop_backup resulted in : 0

### Second line of response does not contain that string either …

[ 99] 2020-06-07 19:17:34.411 ("$PATH: integ/DBAgent/PostgreSQL/PGDMA/PostgresInterface.cpp $ $Rev$ $Date::                          $":131)
[ 99] <<=== (3) }  /* ResponseCheckFor */
[ 99]   RetVal: (bool) FALSE
[ 99] 

### Here the backup is treated as failed …

Fix

configured postgresql.conf lc_messages='en-US.UTF-8' to display messages in English