def is_guc_configurable(cursor, guc):
    """Check if guc is a preset parameter
    https://www.postgresql.org/docs/current/static/runtime-config-preset.html
    """
    cursor.execute("""
        SELECT EXISTS
            (SELECT 1
             FROM pg_settings
             WHERE context <> 'internal'
             AND name = %s);
        """,
        (guc,)
    )
    return cursor.fetchone()[0]