Upgrade 8.17.3 CE -> 9.5.7 CE - Postgresql not update schema

Hello there,
getting crazy with the upgrade.
I discovered the problem is that postgresql is not updated so when I tail the logs I see it fails querying tables.

Can someone help me ?
Is there a way to updgrade schema manually?