File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 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/19 16 :15:17 teodor Exp $
11+ * $PostgreSQL: pgsql/src/backend/access/gist/gistxlog.c,v 1.20 2006/05/19 17 :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 ();
You can’t perform that action at this time.
0 commit comments