Re: Patch for ALTER DATABASE WITH TABLESPACE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bernd Helmle <mailings(at)oopsware(dot)de>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch for ALTER DATABASE WITH TABLESPACE
Date: 2008-11-06 00:20:07
Message-ID: 5190.1225930807@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bernd Helmle <mailings(at)oopsware(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-06 00:39:58 Inefficiency in InitIndexFreeSpaceMap
Previous Message Matthew T. O'Connor 2008-11-06 00:06:35 Re: RAM-only temporary tables