Re: Review: DTrace probes (merged version) ver_03 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Review: DTrace probes (merged version) ver_03
Date
Msg-id 18516.1217254581@sss.pgh.pa.us
Whole thread Raw
In response to Re: Review: DTrace probes (merged version) ver_03  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List pgsql-hackers
Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
> Whats about #include "c.h"? Does it work or does it have same issue?

Same problem --- postgres.h isn't actually including any of the
problematic files for itself.

>> What I suggest might be a reasonable compromise is to copy needed
>> typedefs directly into the probes.d file:

> It works on Solaris as well. However, I think that better solution is to put 
> this typedef to the separate header file.

Not going to work, at least not in the general case, because the
typedefs involved are ultimately dependent on system headers that might
or might not be DTrace-clean.  In any case I'm going to resist doing
random restructuring of our core header files for the convenience
of DTrace --- if we take that approach, adding a new probe becomes
a major PITA instead of just a couple more lines of code.  You're likely
to find requests for new probes getting rejected because the required
header rearrangements are too ugly; do you want to take that risk?

We could put the typedefs into probes.d as a stopgap measure, hoping
that Apple (and Sun?) will someday fix their headers and/or the D
compiler so that #include'ing postgres.h works properly.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: Review: DTrace probes (merged version) ver_03
Next
From: Tom Lane
Date:
Subject: Re: WITH RECUSIVE patches 0723