@nurlan, I have resolved the issue by following the steps outlined below.
Note: Prior to attempting the PMM 3.2.0 upgrade, I had already taken a backup of PMM 2.44.0 from the production server.
- Production Server:
prdpmm101
- Temporary Server:
tmppmm101
After the PMM 3.2.0 upgrade on the production server failed, I decided to restore the PMM 2.44.0 backup to the temporary server, perform the upgrade there, and then migrate the working setup back to the production environment.
Steps taken to resolve the PMM 3.2.0 upgrade issue:
- Restored the PMM 2.44.0 backup on the temporary server
tmppmm101
. - Upgraded the temporary server to PMM 3.2.0.
- Verified the status of all services using the PMM Health Check dashboard.
- This time, the Query Analytics (QAN) functionality came up without issues.
- After confirming the upgrade was successful, I took a backup of PMM 3.2.0 from the temporary server.
- Copied the PMM 3.2.0 backup from
tmppmm101
to the production serverprdpmm101
. - Performed a fresh installation of PMM 3.2.0 on the production server.
- Restored the PMM 3.2.0 backup to the production server.
- Post-restore, I observed that the internal PostgreSQL monitoring was showing issues — specifically, the agent status was displayed as Down on the Service Summary dashboard.
- I reported this issue in the Percona forum:
PMM3 | PostgreSQL | Inside container FATAL: role does not exist - To address the PostgreSQL role issue, it is essential to follow these steps:
- After the fresh installation of PMM 3.2.0 but before restoring the backup, note down the usernames and passwords from the
agents
table for bothpostgres_exporter
andqan-postgresql-pgstatements-agent
.
- Once the backup restoration is complete, update the PostgreSQL agent usernames and passwords in the production server using the values noted in step 11.
UPDATE agents SET username = ‘XXXXXXX’,password = ‘XXXXXXX’,updated_at = NOW() WHERE agent_id = ‘XXXXXXX’ AND agent_type = ‘postgres_exporter’;
UPDATE agents SET username = ‘XXXXXXX’,password = ‘XXXXXXX’,updated_at = NOW() WHERE agent_id = ‘XXXXXXX’ AND agent_type = ‘qan-postgresql-pgstatements-agent’;
- Verify the PostgreSQL agent status in the PMM Service Summary dashboard.
- If all services, including the PostgreSQL monitoring, show as Up, the backup restoration and upgrade process on the production server can be considered successful.