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 1pSMHa-0005u1-Lm for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Feb 2023 18:13:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pSMHZ-0004CP-HA for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Feb 2023 18:13:29 +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 1pSMHZ-0004CG-6N for pgsql-hackers@lists.postgresql.org; Wed, 15 Feb 2023 18:13:29 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSMHS-0007Rs-Ai for pgsql-hackers@postgresql.org; Wed, 15 Feb 2023 18:13:28 +0000 Received: by mail-pf1-x42f.google.com with SMTP id bw10so3441242pfb.0 for ; Wed, 15 Feb 2023 10:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=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=oDMmPKtUJabgLRpsfniunhUKvqcnYVvtaj8qCowajd8=; b=V9iI9lVsEWxDbkCIYpUipRDRoQGYXc1J6SqYQ64PPmHImB2J2ZK8kHycI8RGudlzb4 Pvp+BnKhsbX787mysDDMu3Z13O2Vk78zluPYlqaHmw109vYwI6cqVRx2WVWNN04FVH8n qkKLQvzwlKXzwRvMKgLwMW4Nv5DVySdKPaqU/9WJuhFhQg3jVH4k0ZVv/Tj6178UYs1+ O6A5TB2l/98HFrze5AQ3anBrwO2uE/t9/i8XaGUtIi4rYNnnreu0VvhWwN+7piJD2DmS GI4bvZNF5WCgO8Z66m80v6RnGCKfK7HlSpRpZGJ5RMag8yBRAgquY/GA2Qwl45caX59z losg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=oDMmPKtUJabgLRpsfniunhUKvqcnYVvtaj8qCowajd8=; b=rf2u8CaDAzAbj+BuZj3tDSkscTFaFr4Q0cFPb7CwXqdg6fH417zfzNVdFL9l0qUXcj lLfCvJO5RQxTdS3UDNb6hu3/yyQSfjE/G32oxSI/PxyGIKUDBCEevblFXiDl/aexwXp1 jd3+VkEtLGzYvRhVYAKFqfRPgMVXxjR0VNvyVuIhxkXDuj9/xSmIyRNNr1YPUvXbBDM6 YLYhF3Uj8Fn2xzolnFnTxCwdyOR2hYQDBUVsuKA2+G+siAKKUy1wkPqooVSgCk5An42Y j3FPSuI4kkZanLlo6Dq3XtGJS7r/mElB0D0KVzNBX1C+9QGvrn3iNJhQ9K7R4dKR2mvr cuow== X-Gm-Message-State: AO0yUKWvd0cAmFIasAOzFWt1vn/Nuqv1Y6qV1L4lYlrxFyUs4LIkAOOh MYIPE2DhAK2Ohdx6CmD4bpI= X-Google-Smtp-Source: AK7set9Re6D55NK9wUtGSPoxkdWWVTHUEycPqGtBohK27Z2mwbrQCsA2eYiiF1LcpWL/4CKVqE4miQ== X-Received: by 2002:aa7:9591:0:b0:5a8:ab87:eda with SMTP id z17-20020aa79591000000b005a8ab870edamr2678227pfj.20.1676484800084; Wed, 15 Feb 2023 10:13:20 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id g25-20020a62e319000000b005a81885f342sm5574366pfh.21.2023.02.15.10.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 10:13:19 -0800 (PST) Date: Wed, 15 Feb 2023 10:13:17 -0800 From: Nathan Bossart To: Justin Pryzby Cc: Alvaro Herrera , Andres Freund , Michael Paquier , Kyotaro Horiguchi , thomas.munro@gmail.com, tgl@sss.pgh.pa.us, john.naylor@enterprisedb.com, noriyoshi.shinoda@hpe.com, jchampion@timescale.com, sawada.mshk@gmail.com, masao.fujii@oss.nttdata.com, pgsql-hackers@postgresql.org, rjuju123@gmail.com Subject: Re: Improve logging when using Huge Pages Message-ID: <20230215181317.GA1353037@nathanxps13> References: <20230208231803.GP1653@telsasoft.com> <20230209094013.67varf63bihops33@alvherre.pgsql> <20230209192909.GA606606@nathanxps13> <20230213232245.GI1653@telsasoft.com> <20230214041852.GA1190218@nathanxps13> <20230215013256.GP1653@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230215013256.GP1653@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Feb 14, 2023 at 07:32:56PM -0600, Justin Pryzby wrote: > On Mon, Feb 13, 2023 at 08:18:52PM -0800, Nathan Bossart wrote: >> On Mon, Feb 13, 2023 at 05:22:45PM -0600, Justin Pryzby wrote: >> nitpick: Does this need to be initialized here? > > None of the GUCs' C vars need to be initialized, since the guc machinery > will do it. > > ...but the convention is that they *are* initialized - and that's now > partially enforced. > > See: > d9d873bac67047cfacc9f5ef96ee488f2cb0f1c3 > 7d25958453a60337bcb7bcc986e270792c007ea4 > a73952b795632b2cf5acada8476e7cf75857e9be I see. This looked a little strange to me because many of the other variables are uninitialized. In a73952b, I see that we allow the variables for string GUCs to be initialized to NULL. Anyway, this is only a nitpick. I don't feel strongly about it. >> I'm curious why you chose to make this a string instead of an enum. There >> might be little practical difference, but since there are only three >> possible values, I wonder if it'd be better form to make it an enum. > > It takes more code to write as an enum - see 002.txt. I'm not convinced > this is better. > > But your comment made me fix its , and reconsider the strings, > which I changed to active={unknown/true/false} rather than {unk/on/off}. > It could also be active={unknown/yes/no}... I think unknown/true/false is fine. I'm okay with using a string if no one else thinks it should be an enum (or a bool). -- Nathan Bossart Amazon Web Services: https://aws.amazon.com