Re: [pgsql-patches] Patch to avoid gprofprofilingoverwrites - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [pgsql-patches] Patch to avoid gprofprofilingoverwrites
Date
Msg-id 200702211512.l1LFCVW25999@momjian.us
Whole thread Raw
In response to Re: [pgsql-patches] Patch to avoid gprofprofilingoverwrites  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [pgsql-patches] Patch to avoidgprofprofilingoverwrites
List pgsql-patches
Applied.

---------------------------------------------------------------------------

Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <bruce@momjian.us> writes:
> >
> > > +     CFLAGS="$CFLAGS -DPROFILE_PID_DIR -pg ${PROFILE_CFLAGS}"
> >
> > Kindly use AC_DEFINE instead of random -D in CFLAGS (which is the wrong
> > place for -D anyway).  Also, what exactly is the point here of
> > PROFILE_CFLAGS?  I thought it was supposed to allow substituting
> > something else for -pg, but you've managed to defeat that.
>
> I can't see the value in having a profile flag that just adds an
> environment variable.  I am hoping other compilers will supply the flags
> they need and we can expand this.
>
> > > +         snprintf(gprofDirName, MAXPGPATH, "./gprof/%d", getpid());
> >
> > getpid is not int everywhere; use a cast.  Also, the "./" bits are
> > silly, and if you ask me so is the MAXPGPATH-sized buffer for a string
> > that can't exceed 20 or so bytes.
>
> Patch updated and attached.
>
> --
>   Bruce Momjian  <bruce@momjian.us>          http://momjian.us
>   EnterpriseDB                               http://www.enterprisedb.com
>
>   + If your life is a hard drive, Christ can be your backup. +


>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-patches by date:

Previous
From: Adriaan van Os
Date:
Subject: Re: [BUGS] BUG #2977: dow doesn't conform to ISO-8601
Next
From:
Date:
Subject: Re: [pgsql-patches] Patch to avoidgprofprofilingoverwrites