Debug message in RemoveOldXlogFiles
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
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 3253,3259 **** RemoveOldXlogFiles(uint32 log, uint32 seg, XLogRecPtr endptr)
#endif
struct stat statbuf;
! elog(DEBUG2, "removing WAL segments older than %X/%X", log, seg);
/*
* Initialize info about where to try to recycle to. We allow recycling
--- 3253,3260 ----
#endif
struct stat statbuf;
! elog(DEBUG2, "removing WAL segments older than log file %u, segment %u",
! log, seg);
/*
* Initialize info about where to try to recycle to. We allow recycling
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
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
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