Skip to main content
2 of 2
added 11 characters in body
Laurenz Albe
  • 257k
  • 22
  • 312
  • 388

In the bad plan after the upgrade, all the row count estimates for the scans of the individual partitions is 1, which is far off the actual row count. That is very likely the cause of the bad performance after the upgrade.

It seems that your provider forgot to gather optimizer statistics after running pg_upgrade.

Kudos to Frank Pachot for pointing that out in a comment.

Laurenz Albe
  • 257k
  • 22
  • 312
  • 388