1. Run pg_ctl
pg_ctl
[root@teguhth ~]# su - postgres
Last login: Sun May 12 08:18:13 WIB 2024 on pts/1
-bash-4.2$ pg_ctl -D /var/lib/pgsql/15/data status
-bash: pg_ctl: command not found
-bash-4.2$
-bash-4.2$ pg_ctl -D /var/lib/pgsql/15/data start
-bash: pg_ctl: command not found
-bash-4.2$
-bash-4.2$ pg_ctl -D /var/lib/pgsql/15/data stop
-bash: pg_ctl: command not found
-bash-4.2$
-bash-4.2$
pg_ctl
[root@teguhth ~]# su - postgres
Last login: Sun May 12 08:18:13 WIB 2024 on pts/1
-bash-4.2$ pg_ctl -D /var/lib/pgsql/15/data status
-bash: pg_ctl: command not found
-bash-4.2$
-bash-4.2$ pg_ctl -D /var/lib/pgsql/15/data start
-bash: pg_ctl: command not found
-bash-4.2$
-bash-4.2$ pg_ctl -D /var/lib/pgsql/15/data stop
-bash: pg_ctl: command not found
-bash-4.2$
-bash-4.2$