Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Problem after removal of exec(), help

From: dg(at)illustra(dot)com (David Gould)
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Problem after removal of exec(), help
Date: 1998-06-23 18:22:27
Message-ID: 9806231822.AA10502@hawk.illustra.com (view raw or flat)
Thread:
Lists: pgsql-hackers
> 
> > No help here, but a request:
> > 
> > Could we have an option to do the fork()/exec() the old way as well as the
> > new sleek fork() only. I want to do some performance testing under gprof and
> > want to be able to replace my postgres binary with a shell script to save
> > the gmon.out file eg:
> > 
> > #!/bin/sh
> > postgres.bin $*
> > mv gmon.out gmon.$$
> > 
> > This won't work unless and exec() is done.
> 
> I am confused.  What doesn't work without the exec()?

Replacing the postgres binary with a shell script that executes the real
postgres binary and then moves the gmon.out file out of the way.

    $ mv postgres postgres.bin
    $cat > postgres
    #!/bin/sh
    postgres.bin $*
    mv gmon.out gmon.$$
    ^D
    $ postmaster ...
    $ psql template1

-dg

David Gould           dg(at)illustra(dot)com            510.628.3783 or 510.305.9468
Informix Software                      300 Lakeside Drive   Oakland, CA 94612
 - A child of five could understand this!  Fetch me a child of five.

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-06-23 18:38:02
Subject: Re: [HACKERS] I thought we had fixed this for v6.3.2 ...?
Previous:From: The Hermit HackerDate: 1998-06-23 18:10:29
Subject: I thought we had fixed this for v6.3.2 ...?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group