Set DEBIAN_FRONTEND to noninteractive when installing postgresql.