Re: Big 7.1 open items - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Big 7.1 open items
Date
Msg-id 4941.961604684@sss.pgh.pa.us
Whole thread Raw
In response to Re: Big 7.1 open items  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Big 7.1 open items  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> Well, that opens up a completely different issue, which is what about
>> moving tables from one tablespace to another?

> Are you suggesting that doing dbname/locname is somehow harder to do
> that?  If you are, I don't understand why.

It doesn't make it harder, but it still seems pointless to have the
extra directory level.  Bear in mind that if we go with all-OID
filenames then you're not going to be looking at "loc1" and "loc2"
anyway, but at "5938171" and "8583727".  It's not much of a convenience
to the admin to see that, so we might as well save a level of directory
lookup.

> The general issue of moving tables between tablespaces can be done from
> in the database.  I don't think it is reasonable to shut down the db to
> do that.  However, I can see moving tablespaces to different symlinked
> locations may require a shutdown.

Only if you insist on doing it outside the database using filesystem
tools.  Another way is to create a new tablespace in the desired new
location, then move the tables one-by-one to that new tablespace.

I suppose either one might be preferable depending on your access
patterns --- locking your most critical tables while they're being moved
might be as bad as a total shutdown.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Brook Milligan
Date:
Subject: Re: table permissions and referential integrity
Next
From: Bruce Momjian
Date:
Subject: Re: Big 7.1 open items