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

Commit848b9f0

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 parentab76d8e commit848b9f0

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
@@ -3079,7 +3079,7 @@ XLogFileInit(XLogSegNo logsegno, bool *use_existent, bool use_lock)
30793079
{
30803080
charpath[MAXPGPATH];
30813081
chartmppath[MAXPGPATH];
3082-
charzbuffer_raw[BLCKSZ+MAXIMUM_ALIGNOF];
3082+
charzbuffer_raw[XLOG_BLCKSZ+MAXIMUM_ALIGNOF];
30833083
char*zbuffer;
30843084
XLogSegNoinstalled_segno;
30853085
intmax_advance;
@@ -3139,7 +3139,7 @@ XLogFileInit(XLogSegNo logsegno, bool *use_existent, bool use_lock)
31393139
* cycles transferring data to the kernel.
31403140
*/
31413141
zbuffer= (char*)MAXALIGN(zbuffer_raw);
3142-
memset(zbuffer,0,BLCKSZ);
3142+
memset(zbuffer,0,XLOG_BLCKSZ);
31433143
for (nbytes=0;nbytes<XLogSegSize;nbytes+=XLOG_BLCKSZ)
31443144
{
31453145
errno=0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp