The problemIn the bad plan after the upgrade, all the row count estimates for the scans of the individual partitions is that a type cast from timestamp (without time zone) and timestamp with time zone depends on1, which is far off the current settingactual row count. That is very likely the cause of the parameterbad performance after the upgrade.
It seems that your provider forgot to gather optimizer statistics after running timezonepg_upgrade. So if you say that the query "breaks" on one system (whatever exactly
Kudos to Frank Pachot for pointing that means), the parameter must be set differentlyout in the respective sessionsa comment.