Use of 8192 as BLCKSZ in xlog.c
Use of 8192 as BLCKSZ in xlog.c
От:
Mark Kirkwood <markir@paradise.net.nz>
Дата:
In two of the sections covered by #ifdef WAL_DEBUG there are declarations like: char buf[8192]; It seems to me that these should be: char buf[BLCKSZ]; - or have I misunderstood what is going on here? I realize that it's probably not terribly significant, as most people will do development with BLCKSZ=8192 anyway - I'm just trying to understand the code ... :-). regards Mark
Re: Use of 8192 as BLCKSZ in xlog.c
От:
"Qingqing Zhou" <zhouqq@cs.toronto.edu>
Дата:
"Mark Kirkwood" wrote > In two of the sections covered by #ifdef WAL_DEBUG there are declarations > like: > > char buf[8192]; > > It seems to me that these should be: > > char buf[BLCKSZ]; > Those two 8192 have nothing to do with BLCKSZ, it is just an arbitrary buffer size as long as it is big enough to hold debug information. Regards, Qingqing
Re: Use of 8192 as BLCKSZ in xlog.c
От:
Michael Glaesemann <grzm@myrealbox.com>
Дата:
On Nov 22, 2005, at 11:44 , Qingqing Zhou wrote: > > "Mark Kirkwood" wrote >> In two of the sections covered by #ifdef WAL_DEBUG there are >> declarations >> like: >> >> char buf[8192]; >> > Those two 8192 have nothing to do with BLCKSZ, it is just an arbitrary > buffer size as long as it is big enough to hold debug information. Would it make sense to abstract that out so it's clear that it's *not* related to BLCKSZ? Or maybe just a comment would be enough. Michael Glaesemann grzm myrealbox com
Re: Use of 8192 as BLCKSZ in xlog.c
От:
Qingqing Zhou <zhouqq@cs.toronto.edu>
Дата:
On Mon, 21 Nov 2005, Michael Glaesemann wrote: > > Would it make sense to abstract that out so it's clear that it's > *not* related to BLCKSZ? Or maybe just a comment would be enough. > "Insprite of incremental improvement", I think rename "buf" to "str" would work, Regards, Qingqing
Re: Use of 8192 as BLCKSZ in xlog.c
От:
Mark Kirkwood <markir@paradise.net.nz>
Дата:
Qingqing Zhou wrote: > "Mark Kirkwood" wrote > >>In two of the sections covered by #ifdef WAL_DEBUG there are declarations >>like: >> >>char buf[8192]; > > > > Those two 8192 have nothing to do with BLCKSZ, it is just an arbitrary > buffer size as long as it is big enough to hold debug information. > Thanks - of course, different sort of buffer! It is a bit more obvious now that I'm running with WAL_DEBUG enabled, and can see that nature of the output. As has been suggested, maybe a comment about the size and nature of 'buf' might be a nice addition. cheers Mark