Re: Tablespaces - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Tablespaces
Date
Msg-id 14714.1077833113@sss.pgh.pa.us
Whole thread Raw
In response to Re: Tablespaces  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Re: Tablespaces  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
>> Speaking of locking, can we do anything to prevent people from shooting
>> themselves in the foot by changing active tablespaces?  Are we even
>> going to have a DROP TABLESPACE command, and if so what would it do?

> Ahh. I forgot to detail my ideas on this. It seems to me that we cannot
> drop a table space until the directory is empty.

How would it get to be empty?  Are you thinking of some sort of "connect
database to tablespace" and "disconnect database from tablespace"
commands that would respectively create and delete the per-database
subdirectory?  That seems moderately reasonable to me.  We could then
invent a locking protocol that requires backends to lock a tablespace
before they can execute either of these operations (or delete the
tablespace of course).
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Tablespaces
Next
From: Tom Lane
Date:
Subject: Re: bgwriter never dies