From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Bernd Helmle <mailings(at)oopsware(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Should we cacheline align PGXACT? |
Date: | 2017-02-14 13:06:56 |
Message-ID: | CAPpHfdt-8Mdt0ypwTmgdpQc1REiTc5AsFgJjags8ym0J7BPaYw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Feb 14, 2017 at 3:57 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
> Alexander Korotkov wrote:
> > On Mon, Feb 13, 2017 at 7:07 PM, Alvaro Herrera <
> alvherre(at)2ndquadrant(dot)com>
> > wrote:
>
> > > Re the coding of the padding computation, seems it'd be better to use
> > > our standard "offsetof(last-struct-member) +
> sizeof(last-struct-member)"
> > > rather than adding each of the members' sizes individually.
> >
> > It was done so in order to evade extra level of nesting for PGXACT. See
> > discussion with Tom Lane in [1] and upthread.
>
> Yes, I understand. I just mean that it could be done something like
> this:
>
> #define PGXACTPadSize (PG_CACHE_LINE_SIZE - (offsetof(PGXACT, nxid) +
> sizeof(uint8)))
Yes, but I can't use such macro in the definition of PGXACT itself.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2017-02-14 13:15:54 | Re: pg_waldump's inclusion of backend headers is a mess |
Previous Message | Alvaro Herrera | 2017-02-14 12:57:11 | Re: Should we cacheline align PGXACT? |