Thread: Re: [HACKERS] Patch to implement pg_current_logfile() function

Re: [HACKERS] Patch to implement pg_current_logfile() function

From
Michael Paquier
Date:
On Thu, Jan 19, 2017 at 7:27 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> I thought this part was odd -- I mean, why is SysLogger_Start() being
> called if the collector is not enabled?  Turns out we do it and return
> early if not enabled.  But not in all cases -- there is one callsite in
> postmaster.c that avoids the call if the collector is disabled.  That
> needs to be changed if we want this to work reliably.

Indeed. And actually it is fine to remove the call to FreeFile() in
the error code path of pg_current_logfile().

> I don't think the "abstract names" stuff is an improvement (just look at
> the quoting mess in ConfigureNamesString).  I think we should do without
> that; at least as part of this patch.  If you think there's code that
> can get better because of the idea, let's see it.

Agreed.
-- 
Michael



Re: [HACKERS] Patch to implement pg_current_logfile() function

From
"Karl O. Pinc"
Date:
On Thu, 19 Jan 2017 16:59:10 +0900
Michael Paquier <michael.paquier@gmail.com> wrote:

> On Thu, Jan 19, 2017 at 7:27 AM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:

> > I don't think the "abstract names" stuff is an improvement (just
> > look at the quoting mess in ConfigureNamesString).  I think we
> > should do without that; at least as part of this patch.  If you
> > think there's code that can get better because of the idea, let's
> > see it.  

Fair enough.

FWIW, when I first wrote the "abstract names" stuff there were another
half dozen or so occurrences of the constants.

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."                -- Robert A. Heinlein