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 1on5Zx-0004K3-Q6 for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Oct 2022 22:05:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1on5Zw-0003HY-KR for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Oct 2022 22:05:52 +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 1on5Zv-0003HP-U3 for pgsql-hackers@lists.postgresql.org; Mon, 24 Oct 2022 22:05:52 +0000 Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1on5Zr-0006MW-Ri for pgsql-hackers@postgresql.org; Mon, 24 Oct 2022 22:05:50 +0000 Received: by mail-io1-xd29.google.com with SMTP id l127so8884679iof.12 for ; Mon, 24 Oct 2022 15:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=g8BmkTtzUmZ3I+KuW1znxaOp9ep5YKhQqvsE4HO5dkY=; b=PyhSsGZAqeCtBeqTGPMS4dfQx7hItPTUdURSZt1YUT4dSCk7sndqhNqnqQUO6HUsSp AJOPN0jXNoLglkqUhUvjS7dfErxtlLTcX794Kuu6a/2Rb/1bY42Nmluqe1wFOHCag4Zu 9j+bidhUNe6c0RU81dD49LQuxE9Zgz/5JIbNW418oHl35AXvVU/9aZDA+AUUCjneA4+F OaRgRggVWzy9U21wsWgDGVqsEQXG/KwVUgVlhOlJjdjT1hPzAghcjpR7U+Heldrinpd7 clOSnOFMtGYx/2INLsvNMiBUiODIqQnEzqDWXzzoDujid+qPIWMUKZb8YLTKE7REVO4o oZEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g8BmkTtzUmZ3I+KuW1znxaOp9ep5YKhQqvsE4HO5dkY=; b=4Xdc8wwSe+0sLjxVz90NkS0zQhiXYKw8JTzTe+8KhIPYdLvKnKZflRb8sjIhwD/um2 gQI2CJFDnrx7gNoe4kVCpOeAn2xjVfP0egvzZwYS9S909bHvIlqI6iZPZCrq0v53d92s 8hVP2TqMBy8C7lUeNNd/2fEO+cIJm1/plEOWvCuE0/aI9mSFHv250rQzfT0R816MwJhp J+dsWJPegO4H9SnMzx9Q8ckQNgxBgEBEOLZPIMxOSUOS3aWmxbZpGyzzpzJshcK8UsQ+ DGzkjGduMq96Kej9oye26dOYrwvThpnv8qflfrcZAQybznGPr8bcTxhwc2+jC2ZnLLfI 8Wag== X-Gm-Message-State: ACrzQf3bV1rdRknlYNkM19ugP9Pe3zD9oAZ2Epy4GBKnyzXnto/Xoj/e e2sY4FZOJ8mDHFsGIs2x4YWbUQ== X-Google-Smtp-Source: AMsMyM4caTnsm7OikHzE83dxIBm+v7uTrJUoWMyce/iexPYLmPT/U4elWJeyPx+K1YNk9gAHZf6fVA== X-Received: by 2002:a05:6638:4689:b0:363:b7f4:1372 with SMTP id bq9-20020a056638468900b00363b7f41372mr24802081jab.137.1666649146416; Mon, 24 Oct 2022 15:05:46 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id r25-20020a02aa19000000b003740de9fb60sm237479jam.132.2022.10.24.15.05.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2022 15:05:45 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id A17A18007FB; Mon, 24 Oct 2022 17:05:44 -0500 (CDT) Date: Mon, 24 Oct 2022 17:05:44 -0500 From: Justin Pryzby To: Kyotaro Horiguchi Cc: michael@paquier.xyz, andres@anarazel.de, nathandbossart@gmail.com, pgsql-hackers@postgresql.org, Peter Smith Subject: Re: fix stats_fetch_consistency value in postgresql.conf.sample Message-ID: <20221024220544.GJ16921@telsasoft.com> References: <20220728222734.GA1913@telsasoft.com> <20220913004303.GM31833@telsasoft.com> <20220918045306.GT31833@telsasoft.com> <20220926.172958.1790193605025533956.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="kr14OxHsRwZHHqxS" Content-Disposition: inline In-Reply-To: <20220926.172958.1790193605025533956.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 --kr14OxHsRwZHHqxS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Sep 26, 2022 at 05:29:58PM +0900, Kyotaro Horiguchi wrote: > 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 It's set during initdb. > 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? Suggestions are welcomed. Rebased the patch. I also split the flag into DEFAULTS_COMPILE and DEFAULTS_INITDB, since that makes it easier to understand what the flags mean and the intent of the patch. And maybe allows fewer exclusions in patches like Peter's, which I think would only want to exclude compile-time defaults. -- Justin --kr14OxHsRwZHHqxS Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-add-DYNAMIC_DEFAULT-for-settings-which-vary-by-.-con.patch"