Thread: Debug message in RemoveOldXlogFiles

Debug message in RemoveOldXlogFiles

From
Fujii Masao
Date:
Hi,

In the following debug message in RemoveOldXlogFiles(), the variables
"log" and "seg" don't indicate LSN, so we should use %u instead of %X?

    elog(DEBUG2, "removing WAL segments older than %X/%X", log, seg);

I attached the patch to do so.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment

Re: Debug message in RemoveOldXlogFiles

From
Tom Lane
Date:
Fujii Masao <masao.fujii@gmail.com> writes:
> In the following debug message in RemoveOldXlogFiles(), the variables
> "log" and "seg" don't indicate LSN, so we should use %u instead of %X?
>     elog(DEBUG2, "removing WAL segments older than %X/%X", log, seg);

> I attached the patch to do so.

Applied, thanks.
        regards, tom lane


Re: Debug message in RemoveOldXlogFiles

From
Simon Riggs
Date:
On Thu, 2010-06-17 at 16:13 +0900, Fujii Masao wrote:
> Hi,
> 
> In the following debug message in RemoveOldXlogFiles(), the variables
> "log" and "seg" don't indicate LSN, so we should use %u instead of %X?
> 
>     elog(DEBUG2, "removing WAL segments older than %X/%X", log, seg);
> 
> I attached the patch to do so.

I think it would be more helpful if it showed a filename. Shall we
change that?

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Development, 24x7 Support, Training and Services



Re: Debug message in RemoveOldXlogFiles

From
Tom Lane
Date:
Simon Riggs <simon@2ndQuadrant.com> writes:
> I think it would be more helpful if it showed a filename. Shall we
> change that?

The point of the committed change was to make that message look like
every other one in xlog.c that shows a log/seg pair.

If we were going to start redesigning the printout format, I'd
personally vote for something that makes it easier to compare LSN
printouts and log/seg printouts, like maybe printing log/seg as the
file's starting LSN.  But the main point is that considering any one of
these messages in isolation is the wrong approach.  In any case it's a
bit late to be bikeshedding this for 9.0.
        regards, tom lane