Error message seen during the Postgres database restore step while upgrading to APM 9.6.

Document ID : KB000048099
Last Modified Date : 14/02/2018
Show Technical Document Details

During the new Postgres upgrade process in APM 9.6, a database restore step may be required.

During the restore process, the database is dropped and recreated.

Per the release notes, the PL/pgSQL language is now installed by default for Postgres 9.0.

During the restore, it tries restoring this language. However, the language already exists, causing the following error:

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 31547; 2612 6715804 PROCEDURAL LANGUAGE plpgsql admin
pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql" already exists

This is a typical scenario and these messages can be safely ignored. Note that the restore process continues and finishes normally.