mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
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:
@ -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.21 2010/01/02 16:57:33 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/access/gin/ginxlog.c,v 1.22 2010/02/09 20:31:24 heikki Exp $
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
@ -777,8 +777,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;
|
||||||
@ -789,6 +787,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user