root用户不能使用psql或者pg_dump等pg命令

[size=small]root用户不能使用psql或者pg_dump等pg命令

# ./getdata.sh
./getdata.sh: line 6: psql: command not found
# vi getdata.sh
# psql -U postgres
-bash: psql: command not found

# find / -name "psql"
/home/pgsql/9.1/bin/psql
# ln -s /home/pgsql/9.1/bin/psql /usr/sbin/psql 做一个软链接即可


root用户不能使用pg_dump
# cat bk.log
./backup.sh: line 20: pg_dump: command not found
# ln -s /home/pgsql/9.1/bin/pg_dump /usr/sbin/pg_dump 即可[/size]

你可能感兴趣的:(postgresql)