protected void close() {
      if (ps != null)
        try {
          ps.close();
        } catch (SQLException e) {
          LOG.error("Exception while closing statment", e);
        }

      if (db != null)
        try {
          db.close();
        } catch (SQLException e) {
          LOG.error("Exception while closing connection", e);
        }
    }
Create a postgres workflow fetcher that uses a given connection factory.

@param connectionFactory
         a connection factory
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WorkflowResourceProvider.java