From be02b16826ec9789ed3cb06e4e7531c94e497118 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 30 May 2012 11:58:54 +0300 Subject: Delete the temporary file used in buffered GiST build, after the build. There were two bugs here: We forgot to call gistFreeBuildBuffers() function at the end of build, and we passed interXact == true to BufFileCreateTemp, so the file wasn't automatically cleaned up at end-of-transaction either. --- src/backend/access/gist/gistbuild.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/backend/access/gist/gistbuild.c') diff --git a/src/backend/access/gist/gistbuild.c b/src/backend/access/gist/gistbuild.c index eb39c667c15..73cdc5f5b47 100644 --- a/src/backend/access/gist/gistbuild.c +++ b/src/backend/access/gist/gistbuild.c @@ -214,6 +214,7 @@ gistbuild(PG_FUNCTION_ARGS) { elog(DEBUG1, "all tuples processed, emptying buffers"); gistEmptyAllBuffers(&buildstate); + gistFreeBuildBuffers(buildstate.gfbb); } /* okay, all heap tuples are indexed */ -- cgit v1.2.3