added transaction for reading lobs in postgres