Re: pg_archivecleanup debug message consistency

From: "Erik Rijkers" <er(at)xs4all(dot)nl>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_archivecleanup debug message consistency
Date: 2010-08-22 17:53:11
Message-ID: 124bd864c4d32128e96781ae48ebe16e.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, August 22, 2010 17:54, Tom Lane wrote:
> "Erik Rijkers" <er(at)xs4all(dot)nl> writes:
>> If only for consistency, this patch adds the path info to that message.
>
> Seems reasonable, but speaking of consistency:
>
>> +#ifdef WIN32
>> + snprintf(WALFilePath, MAXPGPATH, "%s\\%s", archiveLocation, exclusiveCleanupFileName);
>> +#else
>> + snprintf(WALFilePath, MAXPGPATH, "%s/%s", archiveLocation, exclusiveCleanupFileName);
>> +#endif
>
> I see that you copied-and-pasted this pattern from somewhere else in
> pg_archivecleanup.c, but I'd like to argue that it's out of place there
> too. We don't go out of our way to show Windows paths with backslashes
> anywhere in the core code, so why is pg_archivecleanup doing it? I
> think we should just drop the ifdef and do %s/%s always.
>

yes, I agree that's better; attached is that change.

And it works fine on linux; but I am not in a position to try it on windows.

Erik Rijkers

Attachment Content-Type Size
pg_archivecleanup.c.diff text/x-patch 1.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-22 18:29:20 UTF16 surrogate pairs in UTF8 encoding
Previous Message Peter Eisentraut 2010-08-22 16:56:58 Re: security label support, part.2