From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de> |
Cc: | Ildus Kurbangaliev <i(dot)kurbangaliev(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Subject: | Re: [PATCH] Refactoring of LWLock tranches |
Date: | 2015-11-16 23:53:12 |
Message-ID: | CA+TgmoZeh5Wsc1DfgLJvuUF=Qj+RY=qn=MPX_Pr=EjLnCHa-8g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Nov 15, 2015 at 7:20 PM, andres(at)anarazel(dot)de <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-11-16 23:55:55 | Re: [PATCH] Refactoring of LWLock tranches |
Previous Message | Jeff Janes | 2015-11-16 23:52:30 | Re: check for interrupts in set_rtable_names |