To perform Near-real time analytics, you have to use Storage Handler API of Hive. Storage Handler API basically keeps the metadata of the external table in the Hive metastore, whereas the tables reside in the external data source(in your case it is postgreSQL).
But the Hive metastore will have all the information of the data (i.e. metadata) i.e. coulnm & format details. So, whenever we are reading data from Hive table with storage handler then the data is fetched from the external table.
You can go to this link & check the Hive handler for PostgreSQL.
To know more about handlers, check this link: