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

Commit09518fb

Browse files
committed
Call MarkBufferDirty() before XLogInsert() during completion of insert
1 parent420cbff commit09518fb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/backend/access/gist/gistxlog.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/gist/gistxlog.c,v 1.19 2006/05/1916:15:17 teodor Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gist/gistxlog.c,v 1.20 2006/05/1917:15:41 teodor Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include"postgres.h"
@@ -753,14 +753,16 @@ gistContinueInsert(gistIncompleteInsert *insert)
753753
* for following possible replays
754754
*/
755755

756-
/* write pages with XLOG LSN */
756+
/* write pages, we should mark it dirty befor XLogInsert() */
757+
for (j=0;j<numbuffer;j++) {
758+
GistPageGetOpaque(pages[j])->rightlink=InvalidBlockNumber;
759+
MarkBufferDirty(buffers[j]);
760+
}
757761
recptr=XLogInsert(RM_GIST_ID,XLOG_GIST_PAGE_UPDATE,rdata);
758762
for (j=0;j<numbuffer;j++)
759763
{
760764
PageSetLSN(pages[j],recptr);
761765
PageSetTLI(pages[j],ThisTimeLineID);
762-
GistPageGetOpaque(pages[j])->rightlink=InvalidBlockNumber;
763-
MarkBufferDirty(buffers[j]);
764766
}
765767

766768
END_CRIT_SECTION();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp