Re: [HACKERS] enum-ify resource manager's xl_info values

2013-07-22 Thread Peter Eisentraut
On 7/22/13 7:21 AM, Andres Freund wrote: > Would somebody object to making the rmgr's invo value #defines like: I'm suspicious of enums that are assigned specific values. Enums should stand by themselves, they shouldn't be a symbolic layer on top of some other numbering or bit-fiddling scheme.

Re: [HACKERS] enum-ify resource manager's xl_info values

2013-07-22 Thread Andres Freund
On 2013-07-22 08:53:53 -0400, Tom Lane wrote: > Andres Freund writes: > > Would somebody object to making the rmgr's invo value #defines like: > > into enums? > > I think that will create more problems than it fixes. For one thing, > the same field is used to store values that would need to be m

Re: [HACKERS] enum-ify resource manager's xl_info values

2013-07-22 Thread Tom Lane
Andres Freund writes: > Would somebody object to making the rmgr's invo value #defines like: > into enums? I think that will create more problems than it fixes. For one thing, the same field is used to store values that would need to be multiple independent enum types; and we also store addition

[HACKERS] enum-ify resource manager's xl_info values

2013-07-22 Thread Andres Freund
Hi, Would somebody object to making the rmgr's invo value #defines like: /* XLOG info values for XLOG rmgr */ #define XLOG_CHECKPOINT_SHUTDOWN0x00 #define XLOG_CHECKPOINT_ONLINE 0x10 #define XLOG_NOOP 0x20 #define XLOG