Sorry I should've mentioned that. Yes we did ANALYZE all the tables after upgrade, we even went ahead and REINDEX all indexes and then also run VACUUM ANALYZE but still facing same performance issue
We recently upgraded our AWS RDS instances to PG 14.4 and are seeing weird performance degradation.
First things first, did you do an ANALYZE on the database after the upgrade? (Maybe RDS does it for you, I don't know. But it isn't worth looking into anything else until you make sure that that has been done)