diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-06-07 19:19:57 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-06-07 19:19:57 +0000 |
commit | 24ee8af57378ee3b065f6a0d62aeb5a5c7313284 (patch) | |
tree | a6cac1fd93221aad889f8f869d8fdbc97ff8834b /src/backend/executor/nodeHashjoin.c | |
parent | 2d9d7a6bf56801e38ba93e22346a5ef3b9ac73ea (diff) | |
download | postgresql-24ee8af57378ee3b065f6a0d62aeb5a5c7313284.tar.gz postgresql-24ee8af57378ee3b065f6a0d62aeb5a5c7313284.zip |
Rework temp_tablespaces patch so that temp tablespaces are assigned separately
for each temp file, rather than once per sort or hashjoin; this allows
spreading the data of a large sort or join across multiple tablespaces.
(I remain dubious that this will make any difference in practice, but certain
people insisted.) Arrange to cache the results of parsing the GUC variable
instead of recomputing from scratch on every demand, and push usage of the
cache down to the bottommost fd.c level.
Diffstat (limited to 'src/backend/executor/nodeHashjoin.c')
-rw-r--r-- | src/backend/executor/nodeHashjoin.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 495548ca821..a07024585e9 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.90 2007/06/03 17:07:26 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.91 2007/06/07 19:19:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -223,8 +223,7 @@ ExecHashJoin(HashJoinState *node) * in the corresponding outer-batch file. */ Assert(batchno > hashtable->curbatch); - ExecHashJoinSaveTuple(hashtable, - ExecFetchSlotMinimalTuple(outerTupleSlot), + ExecHashJoinSaveTuple(ExecFetchSlotMinimalTuple(outerTupleSlot), hashvalue, &hashtable->outerBatchFile[batchno]); node->hj_NeedNewOuter = true; @@ -755,8 +754,7 @@ start_over: * will get messed up. */ void -ExecHashJoinSaveTuple(HashJoinTable hashtable, - MinimalTuple tuple, uint32 hashvalue, +ExecHashJoinSaveTuple(MinimalTuple tuple, uint32 hashvalue, BufFile **fileptr) { BufFile *file = *fileptr; @@ -765,7 +763,7 @@ ExecHashJoinSaveTuple(HashJoinTable hashtable, if (file == NULL) { /* First write to this batch file, so open it. */ - file = BufFileCreateTemp(false, hashtable->hashTblSpc); + file = BufFileCreateTemp(false); *fileptr = file; } |