Skip to content

Commit 79647ee

Browse files
committed
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.
1 parent 09c0747 commit 79647ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/access/gin/ginxlog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/gin/ginxlog.c,v 1.21 2010/01/02 16:57:33 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/gin/ginxlog.c,v 1.22 2010/02/09 20:31:24 heikki Exp $
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include "postgres.h"
@@ -777,8 +777,6 @@ ginContinueSplit(ginIncompleteSplit *split)
777777
GinPageGetOpaque(page)->maxoff))->key;
778778
}
779779

780-
FreeFakeRelcacheEntry(reln);
781-
782780
btree.rightblkno = split->rightBlkno;
783781

784782
stack.blkno = split->leftBlkno;
@@ -789,6 +787,8 @@ ginContinueSplit(ginIncompleteSplit *split)
789787
findParents(&btree, &stack, split->rootBlkno);
790788
ginInsertValue(&btree, stack.parent);
791789

790+
FreeFakeRelcacheEntry(reln);
791+
792792
UnlockReleaseBuffer(buffer);
793793
}
794794

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy