The process of upgrading from previous POSTGRESQL releases is covered in the documentation distributed with each version. Sometimes the pg_upgrade utility can be used. In other cases, a pg_dumpall and reload are required.