Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE

2022-09-07 Thread Peter Eisentraut
On 06.09.22 08:27, Michael Paquier wrote: On Tue, Sep 06, 2022 at 01:57:53AM -0400, Tom Lane wrote: Peter Eisentraut writes: I think renumbering this makes sense. We could just leave the comment as is if we don't come up with a better wording. +1, I see no need to change the comment. We ju

Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE

2022-09-05 Thread Michael Paquier
On Tue, Sep 06, 2022 at 01:57:53AM -0400, Tom Lane wrote: > Peter Eisentraut writes: >> I think renumbering this makes sense. We could just leave the comment >> as is if we don't come up with a better wording. > > +1, I see no need to change the comment. We just need to establish > the precede

Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE

2022-09-05 Thread Tom Lane
Peter Eisentraut writes: > I think renumbering this makes sense. We could just leave the comment > as is if we don't come up with a better wording. +1, I see no need to change the comment. We just need to establish the precedent that values within the GUC_UNIT_MEMORY field can be chosen sequen

Re: [PATCH] Renumber confusing value for GUC_UNIT_BYTE

2022-09-05 Thread Peter Eisentraut
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 th

[PATCH] Renumber confusing value for GUC_UNIT_BYTE

2022-07-20 Thread Justin Pryzby
The GUC units are currently defined like: #define GUC_UNIT_KB 0x1000 /* value is in kilobytes */ #define GUC_UNIT_BLOCKS 0x2000 /* value is in blocks */ #define GUC_UNIT_XBLOCKS0x3000 /* value is in xlog blocks */ #define GUC_UNIT_MB