Hello,
I’m trying to upgrade my GVM instance but it seems I got an error.
I upgraded the compose file, pull the containers but when the migrator container runs, it ends with error.
pg-gvm-migrator-1 | Performing Upgrade
pg-gvm-migrator-1 | ------------------
pg-gvm-migrator-1 | Setting locale and encoding for new cluster ok
pg-gvm-migrator-1 | Analyzing all rows in the new cluster ok
pg-gvm-migrator-1 | Freezing all rows in the new cluster ok
pg-gvm-migrator-1 | Deleting files from new pg_xact ok
pg-gvm-migrator-1 | Copying old pg_xact to new server ok
pg-gvm-migrator-1 | Setting oldest XID for new cluster ok
pg-gvm-migrator-1 | Setting next transaction ID and epoch for new cluster ok
pg-gvm-migrator-1 | Deleting files from new pg_multixact/offsets ok
pg-gvm-migrator-1 | Copying old pg_multixact/offsets to new server ok
pg-gvm-migrator-1 | Deleting files from new pg_multixact/members ok
pg-gvm-migrator-1 | Copying old pg_multixact/members to new server ok
pg-gvm-migrator-1 | Setting next multixact ID and offset for new cluster ok
pg-gvm-migrator-1 | Resetting WAL archives ok
pg-gvm-migrator-1 | Setting frozenxid and minmxid counters in new cluster ok
pg-gvm-migrator-1 | Restoring global objects in the new cluster ok
pg-gvm-migrator-1 | Restoring database schemas in the new cluster
pg-gvm-migrator-1 | *failure*
pg-gvm-migrator-1 |
pg-gvm-migrator-1 | Consult the last few lines of “/var/lib/postgresql/17/main/pg_upgrade_output.d/20260129T111243.609/log/pg_upgrade_
dump_16385.log” for
pg-gvm-migrator-1 | the probable cause of the failure.
pg-gvm-migrator-1 | Failure, exiting
pg-gvm-migrator-1 | ERROR: pg_upgrade failed.
pg-gvm-migrator-1 exited with code 1
I changed the tag of pg-gvm to 22.6.10, removed dependency and also removed the container pg-gvm-migrator to restart my instance.
When I check the log file, it ends with:
pg_restore: creating FK CONSTRAINT “public.report_configs_trash report_configs_trash_owner_fkey”
pg_restore: creating FK CONSTRAINT “public.report_counts report_counts_report_fkey”
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 4621; 2606 85225 FK CONSTRAINT report_counts report_counts_report_fkey gvmd
pg_restore: error: could not execute query: ERROR: there is no unique constraint matching given keys for referenced table “reports”
Command was: ALTER TABLE ONLY “public”.“report_counts”
ADD CONSTRAINT “report_counts_report_fkey” FOREIGN KEY (“report”) REFERENCES “public”.“reports”(“id”) ON DELETE RESTRICT;
What can I do ?
Thanks