Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE
От | Peter Eisentraut |
---|---|
Тема | Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE |
Дата | |
Msg-id | 5a943ffe-b07d-d99c-b96b-f4ed59c6f3ee@enterprisedb.com обсуждение исходный текст |
Ответ на | [PATCH] Renumber confusing value for GUC_UNIT_BYTE (Justin Pryzby <pryzby@telsasoft.com>) |
Ответы |
Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE
|
Список | 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 по дате отправления: