Re: Weird behaviour with the new MOVE clause of ALTER TABLESPACE

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Weird behaviour with the new MOVE clause of ALTER TABLESPACE
Date: 2014-05-10 15:32:31
Message-ID: 1399735951.2783.4.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2014-05-09 at 17:16 -0400, Stephen Frost wrote:
> Guillaume,
>
> * Guillaume Lelarge (guillaume(at)lelarge(dot)info) wrote:
> > Should information_schema tables be moved and not pg_catalog ones? it
> > doesn't seem consistent to me.
>
> The catalog tables are moved by changing the database's tablespace, eg:
>
> ALTER DATABASE ... SET TABLESPACE
>
> That also moves any objects which are not assigned to a specific
> tablespace.
>
> The question ends up being just which side of "is it part of the
> catalog, or not?" the information schema falls on to. For this case, I
> had considered those to *not* be part of the catalog as they can be
> moved independently of the ALTER DATABASE ... SET TABLESPACE.
>
> This is happily documented:
>
> System catalogs will not be moved by this command- individuals wishing to
> move a whole database should use ALTER DATABASE, or call ALTER TABLE on the
> individual system catalogs. Note that relations in <literal>information_schema</literal>
> will be moved, just as any other normal database objects, if the user is the
> superuser or considered an owner of the relations in <literal>information_schema</literal>.
>

Thanks for the explanation. I should have RTFM before complaining. Sorry
for the noise :)

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2014-05-10 16:07:54 Re: Supporting tcl 8.6
Previous Message Andres Freund 2014-05-10 14:56:51 Re: A couple logical decoding fixes/patches