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 1o02K7-0001fp-2M for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Jun 2022 14:42:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o02J6-0006lj-LR for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Jun 2022 14:41:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o02J6-0006lZ-8v for pgsql-hackers@lists.postgresql.org; Sat, 11 Jun 2022 14:41:44 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o02J2-0005Dw-Hu for pgsql-hackers@postgresql.org; Sat, 11 Jun 2022 14:41:42 +0000 Received: by mail-io1-xd30.google.com with SMTP id p128so1799025iof.1 for ; Sat, 11 Jun 2022 07:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=bibEHhKv4H4+rNSorklx95yJAGPCqPdIIZXWdpXJYZg=; b=PDJGUQvrZgZDc+f7ji3SiEKG9PsAct4jWrUd1+/fS9nD2hTuLNtaybLDN21NTInBRU Y2oEUfn1V/47H/BXI/Nj8TJd4gnDBTWJpjWnVEgkwp3jdejgS6kFPGnUV7EhFx/bBsAz ckMYEKnw1BJU4nw2+wBSqDZ9vjuAbU2wuPL3J6Z92udfC9WC4H4DJE58UZ3xYza2MpBx dVDiCxlRoaa6pFmoDC8X9lWSp5F3fAYW5SgV1ljQxJ1tHeZ0vE3tJiIl6+jKsVbResfW maQXgGnoquBrKAd8VNCPTnkuLijQlD5dM+xJMuDoDUV+846q5m9eOX6v621hspdN3Adr b5UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=bibEHhKv4H4+rNSorklx95yJAGPCqPdIIZXWdpXJYZg=; b=TQ1OcqMgTC5NEZG+kG4PfE6fFqlco1iIifPa+H9mHF3pYb/DqZNJZLDAOTurPjAV8A CrLSi2i0v8ilmlqAT9USWNiCNOyn87Z26elaTV9e8Ayo+8p7wAQ/aybhVpqQGMT+d0JW tfWwYUR2AoET0lLXHVStwbC8aRwWhnFFJSTvoGhsUQHqkKYHQ2Vnr2j7fa66QUYeaBxy szL0DtYhxASiBr4o3j9W4B7TD2L6nVeCyRq9+NzmLmUodld3+aHUeNWpgEMBOrpR5k4Y Ki0QernCtTLIMgIpN2s0SRaRNbzHO7res5nGtrT0CtwmZLqHD1CSActy56+WbDK5+tkD j+pg== X-Gm-Message-State: AOAM530+p9+0E9iKXwoQoVA0jiZ6EqE2Af18ZA2g35dWTa4WHCyDtMEF kqorxfL6QlO2wVzTbInDnK6IYnzPxhjp2g== X-Google-Smtp-Source: ABdhPJyeP4uYzy/NsRnjquVW2ec8ufEI7Fikigo986H1FFm4Lw2oeL+rMvtjm0mTVzcPeFyl942XSA== X-Received: by 2002:a05:6638:2113:b0:331:feae:af81 with SMTP id n19-20020a056638211300b00331feaeaf81mr7562585jaj.196.1654958499537; Sat, 11 Jun 2022 07:41:39 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id s18-20020a92cb12000000b002d392d98afdsm1069713ilo.9.2022.06.11.07.41.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Jun 2022 07:41:38 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id F0D868009D6; Sat, 11 Jun 2022 09:41:37 -0500 (CDT) Date: Sat, 11 Jun 2022 09:41:37 -0500 From: Justin Pryzby To: Kyotaro Horiguchi Cc: andres@anarazel.de, michael@paquier.xyz, nathandbossart@gmail.com, pgsql-hackers@postgresql.org Subject: Re: fix stats_fetch_consistency value in postgresql.conf.sample Message-ID: <20220611144137.GC29853@telsasoft.com> References: <20220526.130045.1582015671130082847.horikyota.ntt@gmail.com> <20220526.162753.632795261813283794.horikyota.ntt@gmail.com> <20220528202245.lrjn3v2m5shzgbsq@alap3.anarazel.de> <20220530.172719.867839911471994005.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220530.172719.867839911471994005.horikyota.ntt@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, May 30, 2022 at 05:27:19PM +0900, Kyotaro Horiguchi wrote: > At Sat, 28 May 2022 13:22:45 -0700, Andres Freund wrote in > > Hi, > > > > On 2022-05-26 16:27:53 +0900, Kyotaro Horiguchi wrote: > > > It could be in SQL, but *I* prefer to use perl for this, since it > > > allows me to write a bit complex things (than simple string > > > comparison) simpler. > > > > I wonder if we shouldn't just expose a C function to do this, rather than > > having a separate implementation in a tap test. > > It was annoying that I needed to copy the unit-conversion stuff. I > did that in the attached. parse_val() and check_val() and the duped > data is removed. Note that this gives: guc.c:7573:9: warning: ‘dst’ may be used uninitialized in this function [-Wmaybe-uninitialized] with gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2) I wonder whether you'd consider renaming pg_normalize_config_value() to pg_pretty_config_value() or similar. -- Justin