Just a heads up to anyone else wanting to do an upgrade from ArcGIS Enterprise 11.5 to 12.1. I have run into an issue were the relational datastore will not upgrade. From the logs it looks like a function called st_geometry_accum_func is missing from the Postgresql 18 st_geometry.dll. It looks like that error causes the pg_restore operation to fail and then ArcGIS Data Store reports a failed upgrade because there is no dsadmindb.
Also, I have created a support ticket with Esri.