Added setup_postgresql function to install or upgrade PostgreSQL, including optional modules and backup restoration.