Re: debug log in pg_archivecleanup

From: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: debug log in pg_archivecleanup
Date: 2010-06-16 03:24:34
Message-ID: 20100616122433.B406.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> This is because pg_archivecleanup puts the line break "\n" in the head of
> debug message. Why should we do so?
>
> -----------------------
> if (debug)
> fprintf(stderr, "\n%s: removing \"%s\"", progname, WALFilePath);
> -----------------------

We also need "\n" at line 308.
L.125: fprintf(stderr, "\n%s: removing \"%s\"", progname, WALFilePath);
L.308: fprintf(stderr, "%s: keep WAL file %s and later", progname, exclusiveCleanupFileName);

Note that we don't need a line break at Line 130
because strerror() fills the last %s.
L.130: fprintf(stderr, "\n%s: ERROR failed to remove \"%s\": %s",

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Selena Deckelmann 2010-06-16 03:51:21 Re: ALTER TABLE...ALTER COLUMN vs inheritance
Previous Message Tom Lane 2010-06-16 03:05:36 Re: to enable O_DIRECT within postgresql