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 1oVRNs-00009S-Fr for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2022 05:44:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oVRNr-0007dP-CQ for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Sep 2022 05:44:27 +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 1oVRNq-0007dC-F6 for pgsql-hackers@lists.postgresql.org; Tue, 06 Sep 2022 05:44:27 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVRNl-0001W7-0h for pgsql-hackers@postgresql.org; Tue, 06 Sep 2022 05:44:25 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 98A295C00CF; Tue, 6 Sep 2022 01:44:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 06 Sep 2022 01:44:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1662443055; x= 1662529455; bh=1VIy11Tpdr9gVZXFGGydWb064xeanzoEMQ19Mqgtdug=; b=g B0/TbE7lLPIb8vEynEC7aFosnDWEdeBk/k/9/iRY3yM5QfYxvK8zNfFHai/9EAA7 FzholRctwRLkSh9D6qDd49YwHPMFVMr2p4IDdddcWEV0lYi348l0D1OfCmK/SJ9f bsaGLPg/SkqbexJgUnFysyNw2ApAlJYvlg44B2SjaKCAXa/6RHcqYnQHemqd2AjZ F2GP/JvvUCj1CTYp0J6WpkrnqWoWRvW7iDd908sYCOAdJeZLnHGMH7anax0/Rk0N +ZIliV2jtbKQHNmqvXkSaLcBv+r6Vte2haKkr2Z8uTWUcC8BiZw66jIbChlcqQ9Z 8v9ktfjN6uXVys7bJtfkw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeljedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 6 Sep 2022 01:44:14 -0400 (EDT) Message-ID: <5a943ffe-b07d-d99c-b96b-f4ed59c6f3ee@enterprisedb.com> Date: Tue, 6 Sep 2022 07:44:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE Content-Language: en-US To: Justin Pryzby , Beena Emerson Cc: Andres Freund , pgsql-hackers@postgresql.org References: <20220720145220.GJ12702@telsasoft.com> From: Peter Eisentraut In-Reply-To: <20220720145220.GJ12702@telsasoft.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 20.07.22 16:52, Justin Pryzby wrote: > +/* GUC_UNIT_* are not flags - they're tested for equality */ Well, there is GUC_UNIT_MEMORY, etc. so there is an additional constraint beyond just "pick any number". I'm not sure that "flag" and "tested for equality" are really antonyms anyway. I think renumbering this makes sense. We could just leave the comment as is if we don't come up with a better wording. > #define GUC_UNIT_KB 0x1000 /* value is in kilobytes */ > #define GUC_UNIT_BLOCKS 0x2000 /* value is in blocks */ > #define GUC_UNIT_XBLOCKS 0x3000 /* value is in xlog blocks */ > #define GUC_UNIT_MB 0x4000 /* value is in megabytes */ > -#define GUC_UNIT_BYTE 0x8000 /* value is in bytes */ > +#define GUC_UNIT_BYTE 0x5000 /* value is in bytes */ > #define GUC_UNIT_MEMORY 0xF000 /* mask for size-related units */ > > #define GUC_UNIT_MS 0x10000 /* value is in milliseconds */ > >