diff options
| author | Tom Lane | 2004-07-11 19:52:52 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-07-11 19:52:52 +0000 |
| commit | 8801110b20c6bffe4724e7b27de1c5e519af1b04 (patch) | |
| tree | 387b7b294734422a531f1e759ee013d6996778c2 /src/include | |
| parent | 94d4d240bb5c75124a270d1b5fecab1822cd4728 (diff) | |
Move TablespaceCreateDbspace() call into smgrcreate(), which is where it
probably should have been to begin with; this is to cover cases like
needing to recreate the per-db directory during WAL replay.
Also, fix heap_create to force pg_class.reltablespace to be zero instead
of the database's default tablespace; this makes the world safe for
CREATE DATABASE to handle all tables in the default tablespace alike,
as per previous discussion. And force pg_class.reltablespace to zero
when creating a relation without physical storage (eg, a view); this
avoids possibly having dangling references in this column after a
subsequent DROP TABLESPACE.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/heap.h | 6 | ||||
| -rw-r--r-- | src/include/commands/tablespace.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h index 4ead9728df0..06f0f4da3a4 100644 --- a/src/include/catalog/heap.h +++ b/src/include/catalog/heap.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/heap.h,v 1.67 2004/06/18 06:14:05 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/heap.h,v 1.68 2004/07/11 19:52:51 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -40,11 +40,9 @@ extern Relation heap_create(const char *relname, Oid reltablespace, TupleDesc tupDesc, bool shared_relation, - bool storage_create, + bool create_storage, bool allow_system_table_mods); -extern void heap_storage_create(Relation rel); - extern Oid heap_create_with_catalog(const char *relname, Oid relnamespace, Oid reltablespace, diff --git a/src/include/commands/tablespace.h b/src/include/commands/tablespace.h index 17821493f45..42093c51505 100644 --- a/src/include/commands/tablespace.h +++ b/src/include/commands/tablespace.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/tablespace.h,v 1.2 2004/06/25 21:55:58 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/tablespace.h,v 1.3 2004/07/11 19:52:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -20,7 +20,7 @@ extern void CreateTableSpace(CreateTableSpaceStmt *stmt); extern void DropTableSpace(DropTableSpaceStmt *stmt); -extern void TablespaceCreateDbspace(Oid spcNode, Oid dbNode); +extern void TablespaceCreateDbspace(Oid spcNode, Oid dbNode, bool isRedo); extern Oid get_tablespace_oid(const char *tablespacename); |
