Re: ALTER DATABASE SET TABLESPACE vs crash safety - Mailing list pgsql-hackers

From Decibel!
Subject Re: ALTER DATABASE SET TABLESPACE vs crash safety
Date
Msg-id 0EB1E77B-F9BC-4B32-BEF6-0D9E196C599D@decibel.org
Whole thread Raw
In response to ALTER DATABASE SET TABLESPACE vs crash safety  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ALTER DATABASE SET TABLESPACE vs crash safety  (Bernd Helmle <mailings@oopsware.de>)
List pgsql-hackers
On Nov 7, 2008, at 9:53 AM, Tom Lane wrote:
> So I'm looking at the patch for ALTER DATABASE SET TABLESPACE, and
> wondering about what happens if there's a system crash midway through.
> The answer doesn't look too good: if the deletion pass has started,
> your database is hosed.

FWIW, I don't see this patch as being terribly useful in the real  
world until it can take place in the background, without locking  
stuff for a huge amount of time. That tells me that we should have a  
way to move objects to a new tablespace a little bit at a time. My  
guess is that such a facility would be something that runs in the  
background over many different transactions. Once everything had been  
moved, only then would it go and delete the old files.

But it's too late to get that kind of functionality into 8.4. :( So,  
is there enough demand for this feature to get it into 8.4 and  
possibly paint ourselves into a corner, or should we just wait until  
8.5?
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828




pgsql-hackers by date:

Previous
From: Decibel!
Date:
Subject: Re: [WIP] In-place upgrade
Next
From: Decibel!
Date:
Subject: Re: array_length()