0

I did an upgrade from Postgres 11.6 to 12.2 on AWS-RDS. Post upgrade seeing a couple of issues:

  1. Seems like all reltuples were set to 0 post upgrade

  2. Describe of an object results in error: ERROR: column c.relhasoids does not exist LINE 1: ...riggers, c.relrowsecurity, c.relforcerowsecurity, c.relhasoi...

  • Seems like upgrading the client to Postgres 12 fixes #2. Still need an answer on why the upgrade is setting reltuples to 0 – Raghu M Apr 23 '20 at 17:33
  • Did you run the `analyze` after the upgrade? (pg_upgrade will generate a `analyze_new_cluster` script for that). Which "describe" are you talking about? Given the error message, I would suspect you are using an outdated client that's not compatible with Postgres 12 –  Apr 23 '20 at 17:44
  • Looks like older clients don't work for the \d command. I saw that somewhere else as well – Raghu M Apr 23 '20 at 18:30

1 Answers1

1

It is well known and well documented that stats are not carried over and so you need analyze your database after pg_upgrade.

jjanes
  • 37,812
  • 5
  • 27
  • 34