code: def _read_postmaster_pidfile(data_dir):
          
          pid_line_names = ['pid', 'data_dir', 'start_time', 'port', 'socket_dir', 'listen_addr', 'shmem_key']
          try:
              with open(os.path.join(data_dir, 'postmaster.pid')) as f:
                  return {name: line.rstrip('\n') for name, line in zip(pid_line_names, f)}
          except IOError:
              return {}
docs: Reads and parses postmaster.pid from the data directory
  
          :returns dictionary of values if successful, empty dictionary otherwise