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 1ocjV8-000282-4r for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Sep 2022 08:30:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ocjV6-00089m-QY for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Sep 2022 08:30:04 +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 1ocjV6-00089H-Cy for pgsql-hackers@lists.postgresql.org; Mon, 26 Sep 2022 08:30:04 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ocjV4-0006D5-7V for pgsql-hackers@postgresql.org; Mon, 26 Sep 2022 08:30:03 +0000 Received: by mail-pf1-x435.google.com with SMTP id b23so5931890pfp.9 for ; Mon, 26 Sep 2022 01:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date; bh=16ixCeJ1DSxpb9NRq47/cb5IxudpTy5fSAWIkmiIlNc=; b=N51nPCgN5xJoUrtCAMJVNwJio6b4kBJtpVhAhYfLtkJTAruTFy7qYkWlSqc+HVOeZA qoFuADO3RmD4LjSVfc5NyuQkVcWMzEGaM6T09fWFAhj0wNLEgt4qAo/wyNx1S5u8DjG/ Clg86SbY6mn9nSgkUAP1JS+siMVpHrBBWdaI7ebAKhJoCGjozHF9AEjocQ+i2uIh4rnE y7O1YGDXWHIJXLG4dsiLC/x+f6svEqa8L/+kXpoSzO/DEMChAFGI0qiaPtgXwaaVDTSd u0yxxlys/i9kDx7BO7dPpY51cknNsUG77aSgVL/da7kRAvpg+/kT9OOuYNsyRh/ftXah uoAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date; bh=16ixCeJ1DSxpb9NRq47/cb5IxudpTy5fSAWIkmiIlNc=; b=UUhKsQ9ZWwSYZf/xZrzvigTizxX9ya2zyNSIsZia86GPIKWkHCX5tAYOhtU05ID10i JjJ6fzh7z7fWungvw1MRRxdJVPDuhmSYFZ1/LO0e8P+i9aI+LZusiRgHNQdbOJ7zB1Ac V0LevhzYTSrfwfmIChMzdWPDC2DA2aqYGos43RmltoYKreT+bTDQicZpoFpuOlchxDtm vV3EptSrbIf8cOCyT0d/eaY80ggV70leEC6K7ckKtxDs+2d5HRJLP2nsL8pBsgj6PAUf 9Dqb8ZgP71bDZJ9bJvi099of5XOxBR1kOqZCxv+5ijkmjlW/OwDb828QwccNNO0gxpBp myAw== X-Gm-Message-State: ACrzQf3DLKIdoWyMvhZyLUKcRGhpb5RdrGhrM4hnbtWULDXfDfwBPc4U CQXZLSLxKheilVl3l+ZMBl4= X-Google-Smtp-Source: AMsMyM78e8o+diTPwRDjgJQYwsqECCcBRKzrDjRqS8rNW3nvNR/m+6GP1PiaeGcUm1GBxgpZ1/tKiQ== X-Received: by 2002:a63:8843:0:b0:439:3c8e:c2c0 with SMTP id l64-20020a638843000000b004393c8ec2c0mr19024889pgd.404.1664181001156; Mon, 26 Sep 2022 01:30:01 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id e15-20020a056a0000cf00b0053f2505318asm11832934pfj.142.2022.09.26.01.29.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 26 Sep 2022 01:30:00 -0700 (PDT) Date: Mon, 26 Sep 2022 17:29:58 +0900 (JST) Message-Id: <20220926.172958.1790193605025533956.horikyota.ntt@gmail.com> To: pryzby@telsasoft.com Cc: michael@paquier.xyz, 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: <20220918045306.GT31833@telsasoft.com> References: <20220728222734.GA1913@telsasoft.com> <20220913004303.GM31833@telsasoft.com> <20220918045306.GT31833@telsasoft.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 Sat, 17 Sep 2022 23:53:07 -0500, Justin Pryzby wrote in > This is an alternative implementation, which still relies on adding the > GUC_DYNAMIC, flag but doesn't require adding a new, sql-accessible > function to convert the GUC to a pretty/human display value. Thanks! I'm not sure shared_buffer is GUC_DYNAMIC_DEFAULT, and we need to read postgresql.conf.sample using SQL, but +1 for the direction. + AND NOT (sc.sample_value ~ '^0' AND current_setting(name) ~ '^0') -- zeros may be written differently + AND NOT (sc.sample_value='60s' AND current_setting(name) = '1min') -- two ways to write 1min Mmm. Couldn't we get away from that explicit exceptions? regards. -- Kyotaro Horiguchi NTT Open Source Software Center