check postgres process in mac
ps -ef | grep postgres
check postgres version in ubuntu
$ locate bin/postgres /usr/lib/postgresql/9.3/bin/postgres
Source: chartio.com
ps -ef | grep postgres
$ locate bin/postgres /usr/lib/postgresql/9.3/bin/postgres