Move TablespaceCreateDbspace() call into smgrcreate(), which is where it

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 8801110b20c6bffe4724e7b27de1c5e519af1b04
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2004-07-11T19:52:52Z
Releases: 8.0.0
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.

Files