Re: [PATCH] Refactoring of LWLock tranches - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [PATCH] Refactoring of LWLock tranches
Date
Msg-id CA+TgmoZeh5Wsc1DfgLJvuUF=Qj+RY=qn=MPX_Pr=EjLnCHa-8g@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Refactoring of LWLock tranches  ("andres@anarazel.de" <andres@anarazel.de>)
List pgsql-hackers
On Sun, Nov 15, 2015 at 7:20 PM, andres@anarazel.de <andres@anarazel.de> wrote:
>>  /*
>> + * We reserve a few predefined tranche IDs.  These values will never be
>> + * returned by LWLockNewTrancheId.
>> + */
>> +#define LWTRANCHE_MAIN                                               0
>> +#define LWTRANCHE_BUFFER_CONTENT                     1
>> +#define LWTRANCHE_BUFFER_IO_IN_PROGRESS              2
>> +#define LWTRANCHE_LAST_BUILTIN_ID                    LWTRANCHE_BUFFER_IO_IN_PROGRESS
>
> Nitpick: I'm inclined to use an enum to avoid having to adjust the last
> builtin id when adding a new builtin tranche.

I prefer to do it this way because sometimes enums require a cast.
But if you do the work, I'm not going to fight you over this.

(If I do the work, on the other hand, ...)

> Looks mis-indented now, similarly in a bunch of other places. Maybe
> pg-indent afterwards?

pgindent doesn't change anything for me.

> So, looks good to me.

Great.  Committed.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: check for interrupts in set_rtable_names
Next
From: Robert Haas
Date:
Subject: Re: [PATCH] Refactoring of LWLock tranches