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

Commit964ec46

Browse files
committed
Fix aboriginal bug in BufFileDumpBuffer that would cause it to write the
wrong data when dumping a bufferload that crosses a component-file boundary.This probably has not been seen in the wild because (a) component files arenormally 1GB apiece and (b) non-block-aligned buffer usage is relativelyrare. But it's fairly easy to reproduce a problem if one reduces RELSEG_SIZEin a test build. Kudos to Kurt Harriman for spotting the bug.
1 parentf086be3 commit964ec46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/storage/file/buffile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/storage/file/buffile.c,v 1.25 2007/01/05 22:19:37 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/storage/file/buffile.c,v 1.26 2007/06/01 23:43:11 tgl Exp $
1111
*
1212
* NOTES:
1313
*
@@ -289,7 +289,7 @@ BufFileDumpBuffer(BufFile *file)
289289
return;/* seek failed, give up */
290290
file->offsets[file->curFile]=file->curOffset;
291291
}
292-
bytestowrite=FileWrite(thisfile,file->buffer,bytestowrite);
292+
bytestowrite=FileWrite(thisfile,file->buffer+wpos,bytestowrite);
293293
if (bytestowrite <=0)
294294
return;/* failed to write */
295295
file->offsets[file->curFile]+=bytestowrite;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp