@staticmethod
def set_sync_starting_point(xlogdb_file, last_wal, last_position):
    """
        Check if the xlog.db file has changed between two requests
        from the client and set the start point for reading the file

        :param file xlogdb_file: an open and readable xlog.db file object
        :param str|None last_wal: last read name
        :param int|None last_position: last read position
        :return int: the position has been set
        """
    position = int(last_position) if last_position is not None else 0
    xlogdb_file.seek(position)
    wal_name = xlogdb_file.read(24)
    if wal_name == last_wal:
        xlogdb_file.seek(position)
        return position
    xlogdb_file.seek(0)
    return 0
