How do i setup PostgreSQL?
I highly, highly suggest not installing these things directly to the operating system. It will just be more problematic instead of using a contained, virtual environment.

Instead, I advise using virtual environments (Vagrant/Docker). I use DrupalVM for development. For PostgreSQL you can see this thread for info on how to get it up and going.

Here is a Docker flavored VM with instructions on PostgreSQL support.

The linked drupal.org page you mentioned is four years old. I wouldn't follow it.