def METHOD_NAME(config, name=None):
    env = os.environ.copy()
    env.update(config.get_pg_environment())
    if name is None:
        name = "%s_%s.backup" % (
            env["PGDATABASE"],
            time.strftime("%Y%m%d_%H%M%S"),
        )
    db_dump_file_name = os.path.join(config.get_database_dump_path(), name)
    logger.info("Writing database dump to %s" % db_dump_file_name)
    cmd = (config.get_pg_dump_binary(), "-O", "-x", "-F", "c")
    logger.trace("Executing %s" % str(cmd))
    proc = subprocess.Popen(cmd, env=env, stdout=open(db_dump_file_name, "w+"))
    proc.communicate()