From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Cc: | Robert Lor <Robert(dot)Lor(at)sun(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Subject: | Re: DTrace probe patch for OS X Leopard |
Date: | 2008-02-29 18:57:36 |
Message-ID: | 200802291957.38013.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Am Freitag, 29. Februar 2008 schrieb Robert Lor:
> Currently, pg_trace.h is included in c.h, and I feel strongly that it
> should remains there because by design I'd like to
> 1) have the tracing feature be available both in the frontend and
> backend without having to do anything extra,
I think each component would have its own probes definition file.
> which also means that
> probes.h needs to be generated before any compilation
Well, you are going to have to do a lot more work on the makefiles if you want
to do it that way. Make works by defining dependencies between files, not by
hoping that people will execute the commands in the order you write them. If
you want every single file in the tree to depend on a rule, you will have to
do something different.
> 2) centralize the include of this header just in case the
> implementation needs to be changed for some reason (eg, if this file
> needs to be splitted, etc)
We have no evidence that anything like that will ever happen.
> 3) reduce the number of changes to a minimal when adding new probes to
> new .c files
These arguments seem irrelevant in my mind. When you add new function calls,
you will usually have to add new header files as well. It's the normal way
to do things.
> I haven't heard any major disadvantages about keeping it in c.h, but if
> you are still adamant about keeping it out of c.h, I'll will go along
> with that.
Including only what you need is a principle. It keeps the namespace clean, it
speads up compilation time, it makes the build system simpler and more
efficient. Otherwise we'd only need one header file for everything.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-02-29 19:39:55 | sinval.c / sinvaladt.c restructuring |
Previous Message | Peter Eisentraut | 2008-02-29 18:42:34 | Re: DTrace probe patch for OS X Leopard |