postgres.git / summary / log / commit / refs

commit    79eb0ebd1287a29af186c0c6077da295f7622d4d
Author:   Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:     Wed Apr 16 07:21:09 2014 +0000
First released in: 9.4.0, 8.4.22, 9.0.18, 9.1.14, 9.2.9, 9.3.5

    Use correctly-sized buffer when zero-filling a WAL file.
    
    I mixed up BLCKSZ and XLOG_BLCKSZ when I changed the way the buffer is
    allocated a couple of weeks ago. With the default settings, they are both
    8k, but they can be changed at compile-time.


src/backend/access/transam/xlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 8d404e72685..059c19255f6 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -2289,7 +2289,7 @@ XLogFileInit(uint32 log, uint32 seg, { char path[MAXPGPATH]; char tmppath[MAXPGPATH]; - char zbuffer_raw[BLCKSZ + MAXIMUM_ALIGNOF]; + char zbuffer_raw[XLOG_BLCKSZ + MAXIMUM_ALIGNOF]; char *zbuffer; uint32 installed_log; uint32 installed_seg; @@ -2351,7 +2351,7 @@ XLogFileInit(uint32 log, uint32 seg, * cycles transferring data to the kernel. */ zbuffer = (char *) MAXALIGN(zbuffer_raw); - memset(zbuffer, 0, BLCKSZ); + memset(zbuffer, 0, XLOG_BLCKSZ); for (nbytes = 0; nbytes < XLogSegSize; nbytes += XLOG_BLCKSZ) { errno = 0; [parent: 0c2eb989ea93]