def construct_wal_name(sysinfo):
    """Get wal file name out of something like this:
    {'dbname': '', 'systemid': '6181331723016416192', 'timeline': '1', 'xlogpos': '0/90001B0'}
    """
    log_hex, seg_hex = sysinfo["xlogpos"].split("/", 1)
    # seg_hex's topmost 8 bits are filename, low 24 bits are position in
    # file which we are not interested in
    return name_for_tli_log_seg(
        tli=int(sysinfo["timeline"]),
        log=int(log_hex, 16),
        seg=int(seg_hex, 16) >> 24)
def construct_wal_name ( sysinfo ) : log_hex , seg_hex = sysinfo [ "xlogpos" ] . split ( "/" , 1 ) return name_for_tli_log_seg ( tli = int ( sysinfo [ "timeline" ] ) , log = int ( log_hex , 16 ) , seg = int ( seg_hex , 16 ) >> 24 )
Get wal file name out of something like this:
    {'dbname': '', 'systemid': '6181331723016416192', 'timeline': '1', 'xlogpos': '0/90001B0'}