Fix bug in GIN WAL redo cleanup function: don't free fake relcache entry
while it's still being used. Backpatch to 8.4, where the fake relcache method was introduced.
This commit is contained in:
parent
94d36cbfd0
commit
23eec895df
@ -8,7 +8,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/access/gin/ginxlog.c,v 1.19 2009/06/11 14:48:53 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/access/gin/ginxlog.c,v 1.19.2.1 2010/02/09 20:31:35 heikki Exp $
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
@ -773,8 +773,6 @@ ginContinueSplit(ginIncompleteSplit *split)
|
|||||||
GinPageGetOpaque(page)->maxoff))->key;
|
GinPageGetOpaque(page)->maxoff))->key;
|
||||||
}
|
}
|
||||||
|
|
||||||
FreeFakeRelcacheEntry(reln);
|
|
||||||
|
|
||||||
btree.rightblkno = split->rightBlkno;
|
btree.rightblkno = split->rightBlkno;
|
||||||
|
|
||||||
stack.blkno = split->leftBlkno;
|
stack.blkno = split->leftBlkno;
|
||||||
@ -785,6 +783,8 @@ ginContinueSplit(ginIncompleteSplit *split)
|
|||||||
findParents(&btree, &stack, split->rootBlkno);
|
findParents(&btree, &stack, split->rootBlkno);
|
||||||
ginInsertValue(&btree, stack.parent);
|
ginInsertValue(&btree, stack.parent);
|
||||||
|
|
||||||
|
FreeFakeRelcacheEntry(reln);
|
||||||
|
|
||||||
UnlockReleaseBuffer(buffer);
|
UnlockReleaseBuffer(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user