Re: Raising our compiler requirements for 9.6

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Raising our compiler requirements for 9.6
Date: 2015-08-08 06:30:44
Message-ID: 20150808063044.GA1842698@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 08, 2015 at 02:30:47AM +0200, Andres Freund wrote:
> On 2015-08-07 20:16:20 -0400, Noah Misch wrote:
> > I agree that lock.h offers little to frontend code. Headers that the
> > lockdefs.h patch made usable in the frontend, particularly genam.h and hash.h,
> > are no better.
>
> It's not that simple. Those two, and tuptoaster.h, are actually somewhat
> validly included by frontend code via the rmgr descriptor routines.

genam.h is a dependency of the non-frontend-relevant content of some
frontend-relevant headers, _exactly_ as lock.h has been. I count zero things
in genam.h that a frontend program could harness. The frontend includes
hash.h for two hashdesc.c prototypes, less than the material you moved out of
lock.h for frontend benefit. Yes, it is that simple.

> > The lock.h/lockdefs.h unprincipled split would do more harm
> > than letting frontends continue to pull in lock.h.
>
> Why?

Your header comment for lockdefs.h sums up the harm nicely. Additionally, the
term "defs" does nothing to explain the split. "lock2.h" would be no less
evocative.

> Consider what happens when lock.h/c gets more complicated and
> e.g. grows some atomics. None of the frontend code should see that, and
> it's not much effort to keep it that way. Allowing client code to see
> LOCKMODE isn't something that's going to cause any harm.

Readying the headers for that day brings some value, but you added a worse
mess to achieve it. The overall achievement has negative value.

nm

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Satoshi Nagayasu 2015-08-08 09:00:26 Assert in pg_stat_statements
Previous Message Amit Kapila 2015-08-08 04:14:34 Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file