Modified db_handler to user PostgreSQL