Upgrading to 3.3 fails

The problem was because our we were using old version of postgresql. You may check it by running following command:

sudo -u postgres psql -c “SELECT version();”

After I ran some steps here Upgrading Postgresql to version 12 issue was resolved