From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | CREATE DATABASE with tablespace fix |
Date: | 2004-08-09 22:16:34 |
Message-ID: | Pine.LNX.4.58.0408081654020.18795@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Attached is a patch resolving the issue raised here:
When I was testing this, I noticed the following:
template1=# create tablespace blah location '/home/gavins/pgsql/blah';
CREATE TABLESPACE
template1=# create table foo(i int) tablespace blah;
CREATE TABLE
template1=# create database bar tablespace blah;
ERROR: template database "template1" is already using tablespace "blah"
DETAIL: The default tablespace for a database cannot be in use by the
template
database
template1=# drop table foo;
DROP TABLE
template1=# create database bar tablespace blah;
ERROR: template database "template1" is already using tablespace "blah"
DETAIL: The default tablespace for a database cannot be in use by the
template database
This happens because even though we drop the only entry in the tablespace
we keep the empty database directory around.
Should be test if the directory is empty and if so, not copy it (perhaps
only if it is in the tablespace which will be the default tablespace of
the new database?)
Gavin
Attachment | Content-Type | Size |
---|---|---|
db.diff | text/plain | 3.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2004-08-09 22:30:29 | Postgresql.conf Documentation change |
Previous Message | Bruce Momjian | 2004-08-09 20:39:11 | Re: 8.0: Absolute path required for INITDB? |