check postgres process in mac

C++
$ locate bin/postgres
/usr/lib/postgresql/9.3/bin/postgres
ps -ef | grep postgres
Source

Also in C++: