Re: Patch for ALTER DATABASE WITH TABLESPACE - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch for ALTER DATABASE WITH TABLESPACE
Date
Msg-id 5190.1225930807@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch for ALTER DATABASE WITH TABLESPACE  (Bernd Helmle <mailings@oopsware.de>)
Responses Re: Patch for ALTER DATABASE WITH TABLESPACE
Re: Patch for ALTER DATABASE WITH TABLESPACE
List pgsql-hackers
Bernd Helmle <mailings@oopsware.de> writes:
> * We really should error out when trying to copy into the same tablespace 
> the database already lives in.

No, I think that should just be a no-op.  We don't for instance throw
error when you ALTER OWNER to the existing owner.

> * The current implementation cannot merge a tablespace used by some 
> database objects already, for example:

Hmm --- there's more there than meets the eye.  To handle that case
correctly, you'd have to go into the DB's pg_class and change the
recorded tablespace for those objects to zero.  (Fail to do so, and
you've got a mess when you move the DB to yet another tablespace.)

I tend to agree that throwing an error is sufficient, as long as it's
a clear error message.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Matthew T. O'Connor"
Date:
Subject: Re: RAM-only temporary tables
Next
From: Tom Lane
Date:
Subject: Inefficiency in InitIndexFreeSpaceMap