def METHOD_NAME(self):
    if platform.LINUX and os.getegid() == 0:
        try:
            uid = pwd.getpwnam('postgres').pw_uid
            os.seteuid(uid)
            return True
        except Exception as e:
            logging.error('Failed run as postgres: {0}'.format(e))
            pass
    return False