Often simply Postgres, is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards compliance. It can handle workloads ranging from small single-machine applications to large Internet-facing applications (or for data warehousing) with many concurrent users Postgresql Prerequisites On a Linux or Mac system, you must have superuser privileges to perform a PostgreSQL installation. To perform an installation on a Windows system, you must have administrator privileges.
To changing default port 5432 to 9001 and connection + buffer size we need to edit the postgresql.conf file from below path PostgreSQL is running on default port 5432. you decide to change the default port, please ensure that your new port number does not conflict with any services running on that port.
It will ask new password to login to postgresql
Example for sourcing the sql file form command line $ psql --username=postgres --host=<server ip> --port=9001 --dbname=postgres
** Default lines are present in pg_hab.conf
file**
local
all
all
peer
host
all
all
127.0.0.1/32
ident
host
all
all
::1/128
ident
local
replication
all
peer
host
replication
all
127.0.0.1/32
ident
host
replication
all
::1/128
ident
** Modify with below changes in file /var/lib/pgsql/10/data/pg_hba.conf
**
local
all
all
md5
host
all
all
127.0.0.1/32
ident
host
all
all
0.0.0.0/0
md5
host
all
all
::1/128
ident
local
replication
all
peer
host
replication
all
127.0.0.1/32
ident
host
replication
all
::1/128
ident
Reference link: https://www.tecmint.com/install-postgresql-on-centos-rhel-fedora