Ubuntu18.04 Install Postgres 12 Database
Why install PostgreSQL 12
PostgreSQL 12 has many new features, but the key point is that SQL backup files from PostgreSQL 12 cannot be directly imported into PostgreSQL 10 using the psql command.
The default installation method on Ubuntu 18.04, apt install postgresql, installs PostgreSQL 10, which can cause some trouble when restoring the database.
Therefore, it is best to install PostgreSQL 12 directly in one step.
On Ubuntu 20.04, using apt install postgresql installs PostgreSQL 12 by default.
