diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-06-03 17:08:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-06-03 17:08:34 +0000 |
commit | acfce502ba1f79ff48c9376a4c113ee06b2674b8 (patch) | |
tree | f10f42b5eff0e376f9738667d9efb868745c7d3c /src/backend/commands/tablecmds.c | |
parent | 5d429f8d88333d42072c371716d0345e12200fbc (diff) | |
download | postgresql-acfce502ba1f79ff48c9376a4c113ee06b2674b8.tar.gz postgresql-acfce502ba1f79ff48c9376a4c113ee06b2674b8.zip |
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.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index aafc4d1b2ee..f5bdc35615d 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.225 2007/05/18 23:19:41 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.226 2007/06/03 17:06:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -319,7 +319,7 @@ DefineRelation(CreateStmt *stmt, char relkind) } /* - * Select tablespace to use. If not specified, use default_tablespace + * Select tablespace to use. If not specified, use default tablespace * (which may in turn default to database's default). */ if (stmt->tablespacename) @@ -333,17 +333,10 @@ DefineRelation(CreateStmt *stmt, char relkind) } else { - tablespaceId = GetDefaultTablespace(); + tablespaceId = GetDefaultTablespace(stmt->relation->istemp); /* note InvalidOid is OK in this case */ } - /* - * Parse and validate reloptions, if any. - */ - reloptions = transformRelOptions((Datum) 0, stmt->options, true, false); - - (void) heap_reloptions(relkind, reloptions, true); - /* Check permissions except when using database's default */ if (OidIsValid(tablespaceId)) { @@ -357,6 +350,13 @@ DefineRelation(CreateStmt *stmt, char relkind) } /* + * Parse and validate reloptions, if any. + */ + reloptions = transformRelOptions((Datum) 0, stmt->options, true, false); + + (void) heap_reloptions(relkind, reloptions, true); + + /* * Look up inheritance ancestors and generate relation schema, including * inherited attributes. */ |