The simplest way to check whether your server in PostgreSQL is running or not:

ps auxwww | grep postgres

In versions other than 8.3 you need to run this command

/Library/PostgreSQL/8.3/bin/postgres -D /Library/PostgreSQL/8.3/data

BY Best Interview Question ON 08 Feb 2020