Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE
Date
Msg-id 5a943ffe-b07d-d99c-b96b-f4ed59c6f3ee@enterprisedb.com
Whole thread Raw
In response to [PATCH] Renumber confusing value for GUC_UNIT_BYTE  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE
List pgsql-hackers
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 */
> 
> 




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Modernizing our GUC infrastructure
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Patch to address creation of PgStat* contexts with null parent context