diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2010-02-09 20:31:35 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2010-02-09 20:31:35 +0000 |
commit | 23eec895df920619ae4e0453c2f238b74191bc73 (patch) | |
tree | 2cc0919ed3a008a4b3983a397a4b189f72b913c9 | |
parent | 94d36cbfd0eb593dff5c7bb0fdf6da0c0571832e (diff) | |
download | postgresql-23eec895df920619ae4e0453c2f238b74191bc73.tar.gz postgresql-23eec895df920619ae4e0453c2f238b74191bc73.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.
-rw-r--r-- | src/backend/access/gin/ginxlog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/gin/ginxlog.c b/src/backend/access/gin/ginxlog.c index 1f008b727f0..74601ff548d 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.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" @@ -773,8 +773,6 @@ ginContinueSplit(ginIncompleteSplit *split) GinPageGetOpaque(page)->maxoff))->key; } - FreeFakeRelcacheEntry(reln); - btree.rightblkno = split->rightBlkno; stack.blkno = split->leftBlkno; @@ -785,6 +783,8 @@ ginContinueSplit(ginIncompleteSplit *split) findParents(&btree, &stack, split->rootBlkno); ginInsertValue(&btree, stack.parent); + FreeFakeRelcacheEntry(reln); + UnlockReleaseBuffer(buffer); } |