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

Commit72cbfa4

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 parent2d91f67 commit72cbfa4

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-
* $Header: /cvsroot/pgsql/src/backend/storage/file/buffile.c,v 1.14 2002/09/05 00:43:07 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/file/buffile.c,v 1.14.2.1 2007/06/01 23:43:39 tgl Exp $
1111
*
1212
* NOTES:
1313
*
@@ -287,7 +287,7 @@ BufFileDumpBuffer(BufFile *file)
287287
return;/* seek failed, give up */
288288
file->offsets[file->curFile]=file->curOffset;
289289
}
290-
bytestowrite=FileWrite(thisfile,file->buffer,bytestowrite);
290+
bytestowrite=FileWrite(thisfile,file->buffer+wpos,bytestowrite);
291291
if (bytestowrite <=0)
292292
return;/* failed to write */
293293
file->offsets[file->curFile]+=bytestowrite;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp