pgsql: Enable probes to work with Mac OS X Leopard and other OSes that

Lists: pgsql-committerspgsql-hackers
From: petere(at)postgresql(dot)org (Peter Eisentraut)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-17 19:44:41
Message-ID: 20080317194441.6C53A7558DC@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
Enable probes to work with Mac OS X Leopard and other OSes that will
support DTrace in the future.

Switch from using DTRACE_PROBEn macros to the dynamically generated macros.
Use "dtrace -h" to create a header file that contains the dynamically
generated macros to be used in the source code instead of the DTRACE_PROBEn
macros. A dummy header file is generated for builds without DTrace support.

Author: Robert Lor <Robert(dot)Lor(at)sun(dot)com>

Modified Files:
--------------
pgsql/src/backend:
Makefile (r1.127 -> r1.128)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/Makefile?r1=1.127&r2=1.128)
pgsql/src/backend/access/transam:
xact.c (r1.259 -> r1.260)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c?r1=1.259&r2=1.260)
pgsql/src/backend/storage/lmgr:
lock.c (r1.182 -> r1.183)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lock.c?r1=1.182&r2=1.183)
lwlock.c (r1.50 -> r1.51)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lwlock.c?r1=1.50&r2=1.51)
pgsql/src/backend/utils:
Makefile (r1.26 -> r1.27)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/Makefile?r1=1.26&r2=1.27)
pgsql/src/include:
Makefile (r1.23 -> r1.24)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/Makefile?r1=1.23&r2=1.24)
c.h (r1.223 -> r1.224)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/c.h?r1=1.223&r2=1.224)
pg_trace.h (r1.3 -> r1.4)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/pg_trace.h?r1=1.3&r2=1.4)

Added Files:
-----------
pgsql/src/backend/utils:
Gen_dummy_probes.sed (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/Gen_dummy_probes.sed?rev=1.1&content-type=text/x-cvsweb-markup)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-17 19:57:53
Message-ID: 25614.1205783873@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

petere(at)postgresql(dot)org (Peter Eisentraut) writes:
> Switch from using DTRACE_PROBEn macros to the dynamically generated macros.
> Use "dtrace -h" to create a header file that contains the dynamically
> generated macros to be used in the source code instead of the DTRACE_PROBEn
> macros. A dummy header file is generated for builds without DTrace support.

Gen_dummy_probes.sed? How likely is that to work on Windows?

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-17 20:47:56
Message-ID: 200803172147.57502.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> petere(at)postgresql(dot)org (Peter Eisentraut) writes:
> > Switch from using DTRACE_PROBEn macros to the dynamically generated
> > macros. Use "dtrace -h" to create a header file that contains the
> > dynamically generated macros to be used in the source code instead of the
> > DTRACE_PROBEn macros. A dummy header file is generated for builds
> > without DTrace support.
>
> Gen_dummy_probes.sed? How likely is that to work on Windows?

I think if they can run Gen_fmgrtab, they can get this to work.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-17 20:51:21
Message-ID: 26495.1205787081@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane wrote:
>> Gen_dummy_probes.sed? How likely is that to work on Windows?

> I think if they can run Gen_fmgrtab, they can get this to work.

They can't.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-17 21:46:08
Message-ID: 200803172246.09761.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Tom Lane wrote:
> >> Gen_dummy_probes.sed? How likely is that to work on Windows?
> >
> > I think if they can run Gen_fmgrtab, they can get this to work.
>
> They can't.

They can't run Gen_fmgrtab or they can't get this to work?


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-17 21:59:32
Message-ID: 28878.1205791172@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane wrote:
>> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>>> I think if they can run Gen_fmgrtab, they can get this to work.
>>
>> They can't.

> They can't run Gen_fmgrtab or they can't get this to work?

They can't run Gen_fmgrtab. The MSVC port has its own reimplementation
of that script, and I suppose now it's going to need one to substitute
for this, too.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-17 22:24:25
Message-ID: 200803172324.26383.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Tom Lane wrote:
> >> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> >>> I think if they can run Gen_fmgrtab, they can get this to work.
> >>
> >> They can't.
> >
> > They can't run Gen_fmgrtab or they can't get this to work?
>
> They can't run Gen_fmgrtab. The MSVC port has its own reimplementation
> of that script, and I suppose now it's going to need one to substitute
> for this, too.

Well, yes. I meant to say, a build system that can supply the functionality
of Gen_fmgrtab can surely implement this new thing. I see there is Perl
being used, so it should be simple.


From: "Dave Page" <dpage(at)pgadmin(dot)org>
To: "Peter Eisentraut" <petere(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 09:03:50
Message-ID: 937d27e10803180203n13707a4s7829863b2523c38e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Mon, Mar 17, 2008 at 7:44 PM, Peter Eisentraut <petere(at)postgresql(dot)org> wrote:
> Log Message:
> -----------
> Enable probes to work with Mac OS X Leopard and other OSes that will
> support DTrace in the future.
>
> Switch from using DTRACE_PROBEn macros to the dynamically generated macros.
> Use "dtrace -h" to create a header file that contains the dynamically
> generated macros to be used in the source code instead of the DTRACE_PROBEn
> macros. A dummy header file is generated for builds without DTrace support.

Do we need some support in the buildfarm to create the header file?

--
Dave Page
EnterpriseDB UK Ltd: http://www.enterprisedb.com
PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Dave Page" <dpage(at)pgadmin(dot)org>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 09:40:25
Message-ID: 200803181040.26294.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Am Dienstag, 18. März 2008 schrieb Dave Page:
> On Mon, Mar 17, 2008 at 7:44 PM, Peter Eisentraut <petere(at)postgresql(dot)org>
wrote:
> > Log Message:
> > -----------
> > Enable probes to work with Mac OS X Leopard and other OSes that will
> > support DTrace in the future.
> >
> > Switch from using DTRACE_PROBEn macros to the dynamically generated
> > macros. Use "dtrace -h" to create a header file that contains the
> > dynamically generated macros to be used in the source code instead of the
> > DTRACE_PROBEn macros. A dummy header file is generated for builds
> > without DTrace support.
>
> Do we need some support in the buildfarm to create the header file?

The Windows/MSVC build system needs some adjustments. I have no idea how it
works, but I'd be glad to explain the details to someone who does.


From: "Dave Page" <dpage(at)pgadmin(dot)org>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 09:43:42
Message-ID: 937d27e10803180243p798f8184v2eee53827010b176@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Tue, Mar 18, 2008 at 9:40 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> >
> > Do we need some support in the buildfarm to create the header file?
>
> The Windows/MSVC build system needs some adjustments. I have no idea how it
> works, but I'd be glad to explain the details to someone who does.

I was actually thinking of the OS X buildfarm member I setup to
exercise this. From your description it sounded like we need to
generate the probe header manually if we enable dtrace.

I'm sure Magnus would love to hear the details for the MSVC perl scipts :-p

--
Dave Page
EnterpriseDB UK Ltd: http://www.enterprisedb.com
PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Dave Page" <dpage(at)pgadmin(dot)org>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 11:48:05
Message-ID: 200803181248.05818.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Am Dienstag, 18. März 2008 schrieb Dave Page:
> I was actually thinking of the OS X buildfarm member I setup to
> exercise this. From your description it sounded like we need to
> generate the probe header manually if we enable dtrace.

Nope.


From: "Dave Page" <dpage(at)pgadmin(dot)org>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 11:56:04
Message-ID: 937d27e10803180456na24b65btf6bb7a7e94eed82b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Tue, Mar 18, 2008 at 11:48 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Am Dienstag, 18. März 2008 schrieb Dave Page:
>
> > I was actually thinking of the OS X buildfarm member I setup to
> > exercise this. From your description it sounded like we need to
> > generate the probe header manually if we enable dtrace.
>
> Nope.

OK, I'll enable it on antelope then.

Shouldn't there have been a doc patch with this as well? Last time I
read the docs they said only Solaris supports dtrace.

--
Dave Page
EnterpriseDB UK Ltd: http://www.enterprisedb.com
PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 13:21:44
Message-ID: 20080318132144.GA4625@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Dave Page wrote:

> Shouldn't there have been a doc patch with this as well? Last time I
> read the docs they said only Solaris supports dtrace.

Well, it won't support anything else until somebody tries debugs it ;-)

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 14:39:03
Message-ID: 24846.1205851143@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Dave Page wrote:
>> Shouldn't there have been a doc patch with this as well? Last time I
>> read the docs they said only Solaris supports dtrace.

> Well, it won't support anything else until somebody tries debugs it ;-)

Well, I've got Leopard here, I'd be happy to test it ... but the patch
has rendered
http://developer.postgresql.org/pgdocs/postgres/dynamic-trace.html
into a pack of lies quite independently of which OSes are supported,
so I'm not very sure what to do.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Robert Lor <Robert(dot)Lor(at)sun(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 14:58:43
Message-ID: 200803181558.46529.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Am Dienstag, 18. März 2008 schrieb Tom Lane:
> Well, I've got Leopard here, I'd be happy to test it ... but the patch
> has rendered
> http://developer.postgresql.org/pgdocs/postgres/dynamic-trace.html
> into a pack of lies quite independently of which OSes are supported,
> so I'm not very sure what to do.

Ah yes. Robert, do you think you could update the documentation a bit on how
to use the tracing?


From: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 20:59:08
Message-ID: 47E02D1C.3070805@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Peter Eisentraut wrote:
> Well, yes. I meant to say, a build system that can supply the functionality
> of Gen_fmgrtab can surely implement this new thing. I see there is Perl
> being used, so it should be simple.
>
I was thinking of using a Perl script to generate the dummy header file
but decided against it to avoid disrupting the build on other platforms.
If sed doesn't work on Windows for some reason, we can use a Perl script
instead.

Regards,
-Robert


From: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
To: Peter Eisentraut <petere(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 21:18:41
Message-ID: 47E031B1.7070902@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Peter Eisentraut wrote:
> Modified Files:
> --------------
> pgsql/src/backend:
> Makefile (r1.127 -> r1.128)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/Makefile?r1=1.127&r2=1.128)
> pgsql/src/backend/access/transam:
> xact.c (r1.259 -> r1.260)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c?r1=1.259&r2=1.260)
> pgsql/src/backend/storage/lmgr:
> lock.c (r1.182 -> r1.183)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lock.c?r1=1.182&r2=1.183)
> lwlock.c (r1.50 -> r1.51)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lwlock.c?r1=1.50&r2=1.51)
> pgsql/src/backend/utils:
> Makefile (r1.26 -> r1.27)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/Makefile?r1=1.26&r2=1.27)
> pgsql/src/include:
> Makefile (r1.23 -> r1.24)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/Makefile?r1=1.23&r2=1.24)
> c.h (r1.223 -> r1.224)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/c.h?r1=1.223&r2=1.224)
> pg_trace.h (r1.3 -> r1.4)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/pg_trace.h?r1=1.3&r2=1.4)
>
> Added Files:
> -----------
> pgsql/src/backend/utils:
> Gen_dummy_probes.sed (r1.1)
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/Gen_dummy_probes.sed?rev=1.1&content-type=text/x-cvsweb-markup)
>
>
You didn't include the changes in pgsql/src/Makefile. By generating
probes.h before the compile starts, it will allow probes to be added
outside the backend without having to do anything extra. Is this not the
right way or you think it's not needed now?

Regards,
-Robert


From: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 21:21:17
Message-ID: 47E0324D.3070306@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Peter Eisentraut wrote:
> Am Dienstag, 18. März 2008 schrieb Tom Lane:
>
>> Well, I've got Leopard here, I'd be happy to test it ... but the patch
>> has rendered
>> http://developer.postgresql.org/pgdocs/postgres/dynamic-trace.html
>> into a pack of lies quite independently of which OSes are supported,
>> so I'm not very sure what to do.
>>
>
> Ah yes. Robert, do you think you could update the documentation a bit on how
> to use the tracing?
>
>
Yes, the doc needs to be updated. Will submit a patch soon!

Regards,
-Robert


From: Peter Eisentraut <petere(at)postgresql(dot)org>
To: Robert Lor <Robert(dot)Lor(at)sun(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 21:34:50
Message-ID: 200803182234.51868.petere@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Robert Lor wrote:
> You didn't include the changes in pgsql/src/Makefile.  By generating
> probes.h before the compile starts, it will allow probes to be added
> outside the backend without having to do anything extra. Is this not the
> right way or you think it's not needed now?

Once we have that situation, we can think about the right way to implement it.
Worst case, we just put the hunk back. But it is not needed now.


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 22:07:05
Message-ID: 47E03D09.90703@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Robert Lor wrote:
> Peter Eisentraut wrote:
>> Well, yes. I meant to say, a build system that can supply the
>> functionality of Gen_fmgrtab can surely implement this new thing. I
>> see there is Perl being used, so it should be simple.
>>
> I was thinking of using a Perl script to generate the dummy header
> file but decided against it to avoid disrupting the build on other
> platforms. If sed doesn't work on Windows for some reason, we can use
> a Perl script instead.
>
>

Perl is required for all MSVC builds, and for all builds from CVS on any
platform too, IIRC, so it's a fairly safe bet for any tool you provide.

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 22:14:32
Message-ID: 12472.1205878472@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Robert Lor wrote:
>> I was thinking of using a Perl script to generate the dummy header
>> file but decided against it to avoid disrupting the build on other
>> platforms. If sed doesn't work on Windows for some reason, we can use
>> a Perl script instead.

> Perl is required for all MSVC builds, and for all builds from CVS on any
> platform too, IIRC, so it's a fairly safe bet for any tool you provide.

The key phrase in that is "from CVS". Changing the sed script to Perl
would introduce an unacceptable new dependency for builds from tarballs.

However, there's nothing wrong with using Perl in the MSVC case,
since those scripts need it anyway.

regards, tom lane


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 22:21:55
Message-ID: 20080318152155.09f043f2@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 18 Mar 2008 18:14:32 -0400
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> > Perl is required for all MSVC builds, and for all builds from CVS
> > on any platform too, IIRC, so it's a fairly safe bet for any tool
> > you provide.
>
> The key phrase in that is "from CVS". Changing the sed script to Perl
> would introduce an unacceptable new dependency for builds from
> tarballs.

At some point, do we recognize that Perl is installed on every
reasonable platform in existence or can be easily? I mean, we already
require autoconf/make etc... What is adding Perl in practice?

Sincerely,

Joshua D. Drake

- --
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL political pundit | Mocker of Dolphins

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH4ECDATb/zqfZUUQRApTmAJ9+N+vEuBnydMB1ozkg7FMZgBeA9ACgq6fz
WJXzPkgvqrSkkzV9vnoMYiM=
=n7BS
-----END PGP SIGNATURE-----


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Lor <Robert(dot)Lor(at)sun(dot)com>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 23:07:09
Message-ID: 200803190007.11884.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Joshua D. Drake wrote:
> At some point, do we recognize that Perl is installed on every
> reasonable platform in existence or can be easily? I mean, we already
> require autoconf/make etc... What is adding Perl in practice?

For one thing, a moving target. If we rely on "standard" Unix tools, we have
something fairly stable, if you are careful to read the documentation to omit
the occasional GNU extension. But with Perl, you'd have a constant worry,
which Perl versions to support and which features that Perl version provides.


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Lor <Robert(dot)Lor(at)sun(dot)com>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-18 23:11:10
Message-ID: 20080318161110.4138b24e@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 19 Mar 2008 00:07:09 +0100
Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> Joshua D. Drake wrote:
> > At some point, do we recognize that Perl is installed on every
> > reasonable platform in existence or can be easily? I mean, we
> > already require autoconf/make etc... What is adding Perl in
> > practice?
>
> For one thing, a moving target. If we rely on "standard" Unix tools,
> we have something fairly stable, if you are careful to read the
> documentation to omit the occasional GNU extension. But with Perl,
> you'd have a constant worry, which Perl versions to support and which
> features that Perl version provides.
>

That is certainly reasonable and I have to admit, I don't follow Perl
releases as much as I probably should but I can't remember the last
time something I would do in "standard" perl wouldn't work for every
version of perl since 5.6. I guess there is a consideration with the
imminent, supposedly in our lifetime release of 6.

Fair enough.

Sincerely,

Joshua D. Drake

- --
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL political pundit | Mocker of Dolphins

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH4EwQATb/zqfZUUQRAueHAJ9+YH28v862MP1nBSk16XH5rMQKmQCgnWm1
UimwrFV0siRHC5JGp0o/xic=
=WKN3
-----END PGP SIGNATURE-----


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Lor <Robert(dot)Lor(at)sun(dot)com>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-19 01:28:50
Message-ID: 15821.1205890130@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Joshua D. Drake wrote:
>> What is adding Perl in practice?

> For one thing, a moving target.

Well, if we were that afraid of Perl version discrepancies, we shouldn't
be using it at all anywhere. My point was just that we should not add
a new build tool dependency without a darn good reason; and something
you can easily do in sed doesn't qualify as a darn good reason.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-19 18:07:29
Message-ID: 47E15661.7030709@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Robert Lor wrote:
> Peter Eisentraut wrote:
>> Well, yes. I meant to say, a build system that can supply the
>> functionality of Gen_fmgrtab can surely implement this new thing. I
>> see there is Perl being used, so it should be simple.
>>
> I was thinking of using a Perl script to generate the dummy header
> file but decided against it to avoid disrupting the build on other
> platforms. If sed doesn't work on Windows for some reason, we can use
> a Perl script instead.
>
>

What we should do in fact is to use psed on Windows to execute the
script. This is a sed emulator that is part of the standard perl
install, and will save us the bother of having to maintain two
generation scripts, or switching from sed to perl. We just need to find
where to plug that into the Windows build process.

cheers

andrew


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-19 22:38:03
Message-ID: 47E195CB.4040204@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Andrew Dunstan wrote:
>
>
> Robert Lor wrote:
>> Peter Eisentraut wrote:
>>> Well, yes. I meant to say, a build system that can supply the
>>> functionality of Gen_fmgrtab can surely implement this new thing. I
>>> see there is Perl being used, so it should be simple.
>>>
>> I was thinking of using a Perl script to generate the dummy header
>> file but decided against it to avoid disrupting the build on other
>> platforms. If sed doesn't work on Windows for some reason, we can use
>> a Perl script instead.
>>
>>
>
> What we should do in fact is to use psed on Windows to execute the
> script. This is a sed emulator that is part of the standard perl
> install, and will save us the bother of having to maintain two
> generation scripts, or switching from sed to perl. We just need to find
> where to plug that into the Windows build process.

Hadn't heard about that one. Sounds like a good way to do it, if you can
find the correct place for it :-)

//Magnus


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that
Date: 2008-03-20 00:05:25
Message-ID: 47E1AA45.4050506@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Magnus Hagander wrote:
> Andrew Dunstan wrote:
>>
>>
>> Robert Lor wrote:
>>> Peter Eisentraut wrote:
>>>> Well, yes. I meant to say, a build system that can supply the
>>>> functionality of Gen_fmgrtab can surely implement this new thing.
>>>> I see there is Perl being used, so it should be simple.
>>>>
>>> I was thinking of using a Perl script to generate the dummy header
>>> file but decided against it to avoid disrupting the build on other
>>> platforms. If sed doesn't work on Windows for some reason, we can
>>> use a Perl script instead.
>>>
>>>
>>
>> What we should do in fact is to use psed on Windows to execute the
>> script. This is a sed emulator that is part of the standard perl
>> install, and will save us the bother of having to maintain two
>> generation scripts, or switching from sed to perl. We just need to
>> find where to plug that into the Windows build process.
>
> Hadn't heard about that one. Sounds like a good way to do it, if you
> can find the correct place for it :-)

I'm thinking of the patch below. I'll try it out tomorrow.

cheers

andrew

Index: Solution.pm
===================================================================
RCS file: /cvsroot/pgsql/src/tools/msvc/Solution.pm,v
retrieving revision 1.36
diff -c -r1.36 Solution.pm
*** Solution.pm 28 Feb 2008 12:17:59 -0000 1.36
--- Solution.pm 20 Mar 2008 00:02:05 -0000
***************
*** 205,210 ****
--- 205,216 ----
close(T);
}

+ if
(IsNewer('src\include\utils\probes.h','src\backend\utils\probes.d'))
+ {
+ print "Generating probes.h...\n";
+ system('psed -f src\backend\utils\Gen_dummy_probes.sed
src\backend\utils\probes.d > src\include\utils\probes.h');
+ }
+
if
(IsNewer('src\interfaces\libpq\libpq.rc','src\interfaces\libpq\libpq.rc.in'))
{
print "Generating libpq.rc...\n";