Folks,
Quoth our docs
(http://www.postgresql.org/docs/9.3/static/sql-alterdatabase.html):
"The fourth form changes the default tablespace of the database. Only
the database owner or a superuser can do this; you must also have create
privilege for the new tablespace. This command physically moves any
tables or indexes in the database's old default tablespace to the new
tablespace. Note that tables and indexes in non-default tablespaces are
not affected."
Yet:
jberkus=# alter database phc set tablespace ssd;
ERROR: some relations of database "phc" are already in tablespace "ssd"
HINT: You must move them back to the database's default tablespace
before using this command.
Aside from being a stupid limitation (I need to copy the tables back to
the old tablespace so that I can recopy them to the new one?), the above
seems to be in direct contradiction to the docs.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com