Check out example codes for "metasploit start postgresql". It will help you in understanding the concepts better.

Code Example 1

sudo service postgresql start
sudo msfdb init

Learn ReactJs, React Native from akashmittal.com