Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nu2xM-0000F1-J0 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 May 2022 02:10:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nu2xL-0001fC-GX for pgsql-hackers@arkaria.postgresql.org; Thu, 26 May 2022 02:10:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nu2xL-0001f3-5S for pgsql-hackers@lists.postgresql.org; Thu, 26 May 2022 02:10:31 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nu2xE-0001ii-VZ for pgsql-hackers@postgresql.org; Thu, 26 May 2022 02:10:30 +0000 Received: by mail-pf1-x42e.google.com with SMTP id f21so546939pfa.3 for ; Wed, 25 May 2022 19:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=5ccaCLs6UzlRDcLT6rXkwKylxepzNUCiTba1B0qMI1I=; b=inHZtshgnJ9S1kyQCUN6uaSI1F+9y9H41u5j1+FlSpPikYvJ43TYt5WTBWQHWlNhy4 6o+O/L6GJFUmIAaFNpRRoMskmS/sKbR7EfpDq+6X3I2mCoQZDrHQgaBWmShpSQ42thGp wK2vpOLAx3TXw8hGsjGm6G+HBnX72ro2RNyoiiAtyseASrdZXnFrB7+89Vs0z6yrudp5 zmRvOJiGMAi/TmEPSLI63bUHiF3gyrhjVsSx0Vx6IvTrtEfAdxmxH/r302Y7YqLSVfV3 w9krW8pQA3Y6XFfJJ2Mti9bcZxf6LR6yqJdEIjZqxsp77cuMR3RvcCS3xbzf3cbPCsy1 X2vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=5ccaCLs6UzlRDcLT6rXkwKylxepzNUCiTba1B0qMI1I=; b=BD6AuGf2lI0aebMOEQcLWfxB396FzZLbZH/xqjzUJlEIxlap1RtVl1EBqJQTz1ijkU Ao1FhlSHqcf7aYutRjHlYwgJimogIxIJQJ96uNkXGBG71Sh35/6d+LJTBbHCEHlbttb/ aL9jeRLNZHuNzwMApV+MqaYzfxjQ4EyvWd6+Dv/YiwZJad3Q3ytaOeZR3CnV5yAAqTLp R0glbJRVkJBSVRgbCW5FJBYnueMG4TvHDno3senBHOB8SOMK1powiGz3/IgJz9FIdUHw feOGm8aQWvZNVIgaOrx6AszGdm1tEja0Afb9GxGcCm3gU5mezzbi1INenD/v3R9B3E+7 Qxjw== X-Gm-Message-State: AOAM531XyRHmPZwBG8N3DU1AtKOLbM8XvVIuQbFTtZHhXKadvQ4ZO9qy rsIR4IUXzYYX3DWco+YbvPA= X-Google-Smtp-Source: ABdhPJwV9P+1XQa6Cns9asoP7X/PYXTzLS4+FLL2podflx/ggsE25/qyiT1/x1jKNQENGacWGjVwvQ== X-Received: by 2002:a63:8bc9:0:b0:3f6:ba0c:2914 with SMTP id j192-20020a638bc9000000b003f6ba0c2914mr25495755pge.134.1653531022456; Wed, 25 May 2022 19:10:22 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id iz4-20020a170902ef8400b0015e8d4eb1d2sm105179plb.28.2022.05.25.19.10.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 May 2022 19:10:21 -0700 (PDT) Date: Thu, 26 May 2022 11:10:18 +0900 (JST) Message-Id: <20220526.111018.1043498429473068058.horikyota.ntt@gmail.com> To: michael@paquier.xyz Cc: andres@anarazel.de, nathandbossart@gmail.com, pgsql-hackers@postgresql.org Subject: Re: fix stats_fetch_consistency value in postgresql.conf.sample From: Kyotaro Horiguchi In-Reply-To: References: <20220525.155623.1140106707572944089.horikyota.ntt@gmail.com> <20220525.161207.1389849691748709887.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Thu, 26 May 2022 08:53:55 +0900, Michael Paquier wrote in > On Wed, May 25, 2022 at 04:12:07PM +0900, Kyotaro Horiguchi wrote: > > (sigh..) As the result, no need to fix in this area for now, and I > > don't think there's any generic and reliable way to detect > > inconsistencies of guc variable definitions. > > Hmm. Making the automation test painless in terms of maintenance > consists in making it require zero manual filtering in the list of > GUCs involved, while still being useful in what it can detect. The > units involved in a GUC make the checks between postgresql.conf.sample > and pg_settings.boot_value annoying because they would require extra > calculations depending on the unit with a logic maintained in the > test. > > I may be missing something obvious, of course, but it seems to me that > as long as you fetch the values from postgresql.conf.sample and > cross-check them with pg_settings.boot_value for GUCs that do not have > units, the maintenance would be painless, while still being useful (it > would cover the case of enums, for one). The values need to be > lower-cased for consistency, similarly to the GUC names. Yeah, "boot_val" is appropreate here. And I noticed that pg_settings has the "unit" field. I'll try using them. Thanks for the suggestion! regards. -- Kyotaro Horiguchi NTT Open Source Software Center