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

From Heikki Linnakangas
Subject Re: Temporary WAL segments files not cleaned up after an instancecrash
Date
Msg-id 97377f2c-4a7e-89fb-9da2-904723b2b692@iki.fi
Whole thread Raw
In response to Re: Temporary WAL segments files not cleaned up after an instancecrash  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Temporary WAL segments files not cleaned up after an instancecrash  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 12/07/18 10:44, Michael Paquier wrote:
> On Thu, Jul 12, 2018 at 03:35:53PM +0900, Yugo Nagata wrote:
>> One little thing I noticed is the function name "RemoveXLogTempFiles".
>> Other similar functions are named as RemoveOldXlogFiles or RemoveXlogFile
>> (using Xlog not XLog), so it seem to me more consistent to rename this
>> "RemoveXlogTempFiles" or "RemoveTempXlogFiles" and so on.
> 
> I see, a lower-case for Xlog instead of XLog.  That makes sense.  I have
> used your second suggestion in the attached.  I have also changed the
> thing so as the format of the comment block is better even after
> indenting.

Looks good to me. Just one little nitpick:

> +        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.

- Heikki


pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: pg_create_logical_replication_slot returns text instead of name
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] plpgsql - additional extra checks