Re: Temporary WAL segments files not cleaned up after an instancecrash - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Temporary WAL segments files not cleaned up after an instancecrash
Date
Msg-id 20180712123838.GA1167@paquier.xyz
Whole thread Raw
In response to Re: Temporary WAL segments files not cleaned up after an instancecrash  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Temporary WAL segments files not cleaned up after an instancecrash  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On Thu, Jul 12, 2018 at 01:15:03PM +0300, Heikki Linnakangas wrote:
> On 12/07/18 10:44, Michael Paquier wrote:
> > +        snprintf(path, MAXPGPATH, XLOGDIR "/%s", xlde->d_name);
> > +        elog(DEBUG2, "removed temporary WAL file \"%s\"", path);
> > +        unlink(path);
>
> The elog message says "removed", but the removal actually happens after the
> elog. "removing" would be more accurate.

Or just move the elog() after the file is actually removed?  Would you
be fine with that?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: make installcheck-world in a clean environment
Next
From: Heikki Linnakangas
Date:
Subject: Re: Temporary WAL segments files not cleaned up after an instancecrash