Re: ALTER TABLESPACE ... MOVE ALL TO ...

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLESPACE ... MOVE ALL TO ...
Date: 2014-01-20 15:58:20
Message-ID: CA+U5nM+EYdH3zL-ww8Dqrve9pJH8bLRA1Q0kED9YNGoR=RAp9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20 January 2014 15:46, Stephen Frost <sfrost(at)snowman(dot)net> wrote:

> So you're still looking for an 'OWNED' noise word to be added?

To clarify what the command is actually doing.

> Also, I
> did add the ability to specify types of objects (it's often that we'll
> have a "INDEXES" tablespace, so this made sense), so how about:
>
> ALTER TABLESPACE name MOVE OWNED TO name opt_nowait

The ALL seems to have value. "MOVE ALL OWNED TO" sounds better.

> ALTER TABLESPACE name MOVE TABLES OWNED TO name opt_nowait
> ALTER TABLESPACE name MOVE INDEXES OWNED TO name opt_nowait

On those two, I think the docs need to be clearer that we mean that
TABLES means tables, and yes we leave the indexes behind. Or that
INDEXES means "and we leave the tables behind. This is intended to
more easily separate tables and indexes into their own tablespaces."
or similar.

> ALTER TABLESPACE name MOVE MATERIALIZED VIEWS OWNED TO name opt_nowait
>
> Removing the 'ALL' entirely?
>
> Should there be an "OWNED BY name_list" option also, since that's how we
> use 'OWNED' elsewhere? Should the use of "OWNED" elsewhere (eg:
> REASSIGN OWNED BY) also support just 'OWNED' to mean the current role
> (I'm not entirely sure how much sense that makes, but figured I'd ask).

Maybe.

I'm not clamouring for squeezing additional goodies from you, just to
make a small change to avoid later confusion (for ALL users ;-) )

Good feature, thanks for working on it.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-01-20 16:00:22 Re: ALTER TABLESPACE ... MOVE ALL TO ...
Previous Message Tom Lane 2014-01-20 15:46:16 Re: ALTER TABLESPACE ... MOVE ALL TO ...