aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginxlog.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2010-02-09 20:31:24 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2010-02-09 20:31:24 +0000
commit79647eed86cc972e80ea165dcb0b7f6fef876169 (patch)
treeeee7f294f3d541bc7baa976ee12e2740559bd82e /src/backend/access/gin/ginxlog.c
parent09c0747515cc0663417ed8c78ede966ab14dfa0e (diff)
downloadpostgresql-79647eed86cc972e80ea165dcb0b7f6fef876169.tar.gz
postgresql-79647eed86cc972e80ea165dcb0b7f6fef876169.zip
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.
Diffstat (limited to 'src/backend/access/gin/ginxlog.c')
-rw-r--r--src/backend/access/gin/ginxlog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/gin/ginxlog.c b/src/backend/access/gin/ginxlog.c
index eb90ddd684e..cff5bc8bd59 100644
--- a/src/backend/access/gin/ginxlog.c
+++ b/src/backend/access/gin/ginxlog.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* 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"
@@ -777,8 +777,6 @@ ginContinueSplit(ginIncompleteSplit *split)
GinPageGetOpaque(page)->maxoff))->key;
}
- FreeFakeRelcacheEntry(reln);
-
btree.rightblkno = split->rightBlkno;
stack.blkno = split->leftBlkno;
@@ -789,6 +787,8 @@ ginContinueSplit(ginIncompleteSplit *split)
findParents(&btree, &stack, split->rootBlkno);
ginInsertValue(&btree, stack.parent);
+ FreeFakeRelcacheEntry(reln);
+
UnlockReleaseBuffer(buffer);
}