All attempts to upgrade from 11.4.5 to 12.1 fail.
As part of the upgrade process we first dump then restore all databases to a new folder, so we can upgrade the application and restore the databases to the new version of PGSQL.
During the restore process we can see that we try to create the same table twice, but since it already exists (as we just created it) the process fail as well as the upgrade task:
pg_restore: creating TABLE "public.retiredsegmentstreams"
pg_restore: creating TABLE "public.retiredsegmentstreams"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 302; 1259 17353 TABLE retiredsegmentstreams postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "retiredsegmentstreams" already exists