password asking multiple times for postgres user
kbharathdba28 opened this issue · 1 comments
kbharathdba28 commented
followed github instructions to configure pgdsat tool but its asking password for postgres user continuously.
[postgres@RHEL8 ~]$ pgdsat -U postgres -h localhost -d postgres -o report.html
Password for user postgres:
Password for user postgres:
followed below steps:
- wget https://github.com/HexaCluster/pgdsat/archive/refs/tags/v1.1.tar.gz
- untar the downloaded file (tar -xvf v1.1.tar.gz)
- perl Makefile.PL
- make
- sudo make install
- dnf install perl-bignum perl-Math-BigRat
7)[postgres@RHEL8 ~]$ cat .bash_profile
[ -f /etc/profile ] && source /etc/profile
#PGDATA=/var/lib/pgsql/16/data
#export PGDATA
PATH=/usr/pgsql-16/bin:$PATH:$HOME/bin
PGDATA=/var/lib/pgsql/16/data/
PGHOME=/usr/pgsql-16/bin
PGPORT=5432
PGUSER=postgres
export PATH PGDATA PGPORT PGUSER PGHOME
If you want to customize your settings,
Use the file below. This is not overridden
by the RPMS.
#[ -f /var/lib/pgsql/.pgsql_profile ] && source /var/lib/pgsql/.pgsql_profile
. /etc/bashrc
[ -f /var/lib/pgsql/.pgsql_profile ] && source /var/lib/pgsql/.pgsql_profile"
[postgres@RHEL8 ~]$
darold commented
pgsdat use the psql command multiple time to collect information. You should either set the PGPASSWORD environment variable or better, create a .pgpass file with the connection information.