Re: Temporary WAL segments files not cleaned up after an instance crash

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Temporary WAL segments files not cleaned up after an instance crash
Date: 2018-07-12 12:38:38
Message-ID: 20180712123838.GA1167@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2018-07-12 12:40:43 Re: Temporary WAL segments files not cleaned up after an instance crash
Previous Message Alexander Lakhin 2018-07-12 12:32:00 Re: make installcheck-world in a clean environment