Re: [HACKERS] Patch to implement pg_current_logfile() function - Mailing list pgsql-hackers

From Karl O. Pinc
Subject Re: [HACKERS] Patch to implement pg_current_logfile() function
Date
Msg-id 20170304090517.7e4cc42e@slate.meme.com
Whole thread Raw
In response to Re: [HACKERS] Patch to implement pg_current_logfile() function  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] Patch to implement pg_current_logfile() function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, 4 Mar 2017 14:26:54 +0530
Robert Haas <robertmhaas@gmail.com> wrote:

> On Fri, Mar 3, 2017 at 7:21 PM, Karl O. Pinc <kop@meme.com> wrote:
> > But if the code does not exit the loop then
> > before calling elog(ERROR), shouldn't it
> > also call FreeFile(fd)?  
> 
> Hmm.  Normally error recovery cleans up opened files, but since
> logfile_open() directly calls fopen(), that's not going to work here.
> So that does seem to be a problem.

Should something different be done to open the file or is it
enough to call FreeFile(fd) to clean up properly?

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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] wait events for disk I/O
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Patch to implement pg_current_logfile() function