Debug message in RemoveOldXlogFiles

Started by Fujii Masaoalmost 16 years ago4 messageshackers
Jump to latest
#1Fujii Masao
masao.fujii@gmail.com

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

Attachments:

remove_old_wal_debug_v1.patchapplication/octet-stream; name=remove_old_wal_debug_v1.patchDownload+3-3
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Fujii Masao (#1)
Re: Debug message in RemoveOldXlogFiles

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

#3Simon Riggs
simon@2ndQuadrant.com
In reply to: Fujii Masao (#1)
Re: Debug message in RemoveOldXlogFiles

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.com
PostgreSQL Development, 24x7 Support, Training and Services

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Simon Riggs (#3)
Re: Debug message in RemoveOldXlogFiles

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