Incomplete Migration Error During Vembu BDR Upgrade to v3.9.1 Update 1

Incomplete Migration Error During Vembu BDR Upgrade to v3.9.1 Update 1

KB ID: 115087
Users encountering the error message "The migration of BDRShield to a previous version was not fully completed. You cannot upgrade to the current version if the migration process in the previous version was not fully completed. Please restart BDRShield to let the migration process complete" during the upgrade process to the latest version (v3.9.1 Update 1) can follow the steps below for resolution:
1. Restart the VembuBDR service.
2. Open the command prompt with administrator privileges.
3. Execute the following query in the command prompt:
psql -U postgres -p <port_value> -d SGDatabase -t -c "select max(MIGRATION_STATUS) from MIGRATION_1_6_TO_2_0"
Note: Replace `<port_value>` with the actual port value set in PostgreSQL.conf.
For example:
psql -U postgres -p 32010 -d SGDatabase -t -c "select max(MIGRATIONSTATUS) from MIGRATION16TO20"
4. If you encounter the error "psql is not recognized as an internal or external command," set the path for the bin and lib folders in the environmental variables:
;C:\Program Files\PostgreSQL\9.6\bin ;C:\Program Files\PostgreSQL\9.6\lib
 You can add these paths using the following methods:
  1. Use the `set PATH [the path]` command in CMD prompt.
  2. Navigate to Computer → Properties → Advanced System Settings → Environment Variables → System Variables, and add the paths manually. Do not replace existing paths; add these beside them.
5. After adding the environment variables, repeat Step 3. You should now be able to execute the Psql command from any location.
If you continue to experience issues, please contact BDRShield support at vembu-support@vembu.com.