diff options
author | Robert Haas <rhaas@postgresql.org> | 2010-01-05 21:54:00 +0000 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2010-01-05 21:54:00 +0000 |
commit | d86d51a95810caebcea587498068ff32fe28293e (patch) | |
tree | 031fb02a2ef325762250b163acd215cd7c31c2bb /src/include/nodes | |
parent | 72559b49c051ff7dc860068c96324ddf07d7955d (diff) | |
download | postgresql-d86d51a95810caebcea587498068ff32fe28293e.tar.gz postgresql-d86d51a95810caebcea587498068ff32fe28293e.zip |
Support ALTER TABLESPACE name SET/RESET ( tablespace_options ).
This patch only supports seq_page_cost and random_page_cost as parameters,
but it provides the infrastructure to scalably support many more.
In particular, we may want to add support for effective_io_concurrency,
but I'm leaving that as future work for now.
Thanks to Tom Lane for design help and Alvaro Herrera for the review.
Diffstat (limited to 'src/include/nodes')
-rw-r--r-- | src/include/nodes/nodes.h | 3 | ||||
-rw-r--r-- | src/include/nodes/parsenodes.h | 10 | ||||
-rw-r--r-- | src/include/nodes/relation.h | 4 |
3 files changed, 14 insertions, 3 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index a84de410963..e1da4954390 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.232 2010/01/02 16:58:04 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.233 2010/01/05 21:53:59 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -346,6 +346,7 @@ typedef enum NodeTag T_CreateUserMappingStmt, T_AlterUserMappingStmt, T_DropUserMappingStmt, + T_AlterTableSpaceOptionsStmt, /* * TAGS FOR PARSE TREE NODES (parsenodes.h) diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index d94c6f99086..18673ec30d8 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.421 2010/01/02 16:58:04 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.422 2010/01/05 21:53:59 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -1477,6 +1477,14 @@ typedef struct DropTableSpaceStmt bool missing_ok; /* skip error if missing? */ } DropTableSpaceStmt; +typedef struct AlterTableSpaceOptionsStmt +{ + NodeTag type; + char *tablespacename; + List *options; + bool isReset; +} AlterTableSpaceOptionsStmt; + /* ---------------------- * Create/Drop FOREIGN DATA WRAPPER Statements * ---------------------- diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index df8f4afc8d4..fd93dfcce34 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.182 2010/01/02 16:58:07 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.183 2010/01/05 21:54:00 rhaas Exp $ * *------------------------------------------------------------------------- */ @@ -371,6 +371,7 @@ typedef struct RelOptInfo /* information about a base rel (not set for join rels!) */ Index relid; + Oid reltablespace; /* containing tablespace */ RTEKind rtekind; /* RELATION, SUBQUERY, or FUNCTION */ AttrNumber min_attr; /* smallest attrno of rel (often <0) */ AttrNumber max_attr; /* largest attrno of rel */ @@ -435,6 +436,7 @@ typedef struct IndexOptInfo NodeTag type; Oid indexoid; /* OID of the index relation */ + Oid reltablespace; /* tablespace of index (not table) */ RelOptInfo *rel; /* back-link to index's table */ /* statistics from pg_class */ |