Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61df3d0

Browse files
committed
Use correctly-sized buffer when zero-filling a WAL file.
I mixed up BLCKSZ and XLOG_BLCKSZ when I changed the way the buffer isallocated a couple of weeks ago. With the default settings, they are both8k, but they can be changed at compile-time.
1 parent0de1068 commit61df3d0

File tree

1 file changed

+2
-2
lines changed
  • src/backend/access/transam

1 file changed

+2
-2
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,7 +2348,7 @@ XLogFileInit(uint32 log, uint32 seg,
23482348
{
23492349
charpath[MAXPGPATH];
23502350
chartmppath[MAXPGPATH];
2351-
charzbuffer_raw[BLCKSZ+MAXIMUM_ALIGNOF];
2351+
charzbuffer_raw[XLOG_BLCKSZ+MAXIMUM_ALIGNOF];
23522352
char*zbuffer;
23532353
uint32installed_log;
23542354
uint32installed_seg;
@@ -2410,7 +2410,7 @@ XLogFileInit(uint32 log, uint32 seg,
24102410
* cycles transferring data to the kernel.
24112411
*/
24122412
zbuffer= (char*)MAXALIGN(zbuffer_raw);
2413-
memset(zbuffer,0,BLCKSZ);
2413+
memset(zbuffer,0,XLOG_BLCKSZ);
24142414
for (nbytes=0;nbytes<XLogSegSize;nbytes+=XLOG_BLCKSZ)
24152415
{
24162416
errno=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp