<property><name>javax.jdo.option.ConnectionURL</name><value>jdbc:postgresql://localhost:5432/postgres</value><description>JDBC connect string for a JDBC metastore</description></property><property><name>javax.jdo.option.ConnectionDriverName</name><value>org.postgresql.Driver</value><description>Driver class name for a JDBC metastore</description></property><property><name>javax.jdo.option.ConnectionPassword</name><value>123456</value><description>password to use against metastore database</description></property><property><name>hive.metastore.warehouse.dir</name><value>/user/hive/warehouse</value><description>location of default database for the warehouse</description></property>

create related tables in postgresql.
This schema file is under $HIVE_HOME/scripts, find the one that fit your requirement.

psql -Upostgres -h127.0.0.1 -f hive-schema-0.9.0.postgres.sql

Download the JDBC driver for postgresql and move it into $HIVE_HOME/lib