mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Create a GUC parameter temp_tablespaces that allows selection of the
tablespace(s) in which to store temp tables and temporary files. This is a list to allow spreading the load across multiple tablespaces (a random list element is chosen each time a temp object is to be created). Temp files are not stored in per-database pgsql_tmp/ directories anymore, but per-tablespace directories. Jaime Casanova and Albert Cervera, with review by Bernd Helmle and Tom Lane.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.89 2007/02/02 00:07:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.90 2007/06/03 17:07:26 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -223,7 +223,8 @@ ExecHashJoin(HashJoinState *node)
|
||||
* in the corresponding outer-batch file.
|
||||
*/
|
||||
Assert(batchno > hashtable->curbatch);
|
||||
ExecHashJoinSaveTuple(ExecFetchSlotMinimalTuple(outerTupleSlot),
|
||||
ExecHashJoinSaveTuple(hashtable,
|
||||
ExecFetchSlotMinimalTuple(outerTupleSlot),
|
||||
hashvalue,
|
||||
&hashtable->outerBatchFile[batchno]);
|
||||
node->hj_NeedNewOuter = true;
|
||||
@ -754,7 +755,8 @@ start_over:
|
||||
* will get messed up.
|
||||
*/
|
||||
void
|
||||
ExecHashJoinSaveTuple(MinimalTuple tuple, uint32 hashvalue,
|
||||
ExecHashJoinSaveTuple(HashJoinTable hashtable,
|
||||
MinimalTuple tuple, uint32 hashvalue,
|
||||
BufFile **fileptr)
|
||||
{
|
||||
BufFile *file = *fileptr;
|
||||
@ -763,7 +765,7 @@ ExecHashJoinSaveTuple(MinimalTuple tuple, uint32 hashvalue,
|
||||
if (file == NULL)
|
||||
{
|
||||
/* First write to this batch file, so open it. */
|
||||
file = BufFileCreateTemp(false);
|
||||
file = BufFileCreateTemp(false, hashtable->hashTblSpc);
|
||||
*fileptr = file;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user