Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe02b16

Browse files
committed
Delete the temporary file used in buffered GiST build, after the build.
There were two bugs here: We forgot to call gistFreeBuildBuffers() functionat the end of build, and we passed interXact == true to BufFileCreateTemp,so the file wasn't automatically cleaned up at end-of-transaction either.
1 parent4317e02 commitbe02b16

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎src/backend/access/gist/gistbuild.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ gistbuild(PG_FUNCTION_ARGS)
214214
{
215215
elog(DEBUG1,"all tuples processed, emptying buffers");
216216
gistEmptyAllBuffers(&buildstate);
217+
gistFreeBuildBuffers(buildstate.gfbb);
217218
}
218219

219220
/* okay, all heap tuples are indexed */

‎src/backend/access/gist/gistbuildbuffers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ gistInitBuildBuffers(int pagesPerBuffer, int levelStep, int maxLevel)
5858
* Create a temporary file to hold buffer pages that are swapped out of
5959
* memory.
6060
*/
61-
gfbb->pfile=BufFileCreateTemp(true);
61+
gfbb->pfile=BufFileCreateTemp(false);
6262
gfbb->nFileBlocks=0;
6363

6464
/* Initialize free page management. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp