Sửa lỗi psql: command not found

 [root@server1 ~]# su postgres

 [postgres@server1 root]$ psql -f all.sql
 bash: psql: command not found

Chạy câu lệnh sau

export PATH=/opt/PostgreSQL/9.5/bin:$PATH

Related posts

Perform Manual Failover & Switchover with repmgr in PostgreSQL

Configure automatic failover with repmgrd in PostgreSQL

Monitor Streaming Replication trong PostgreSQL