Re: Tablespace issues (comment on ,moving indexes)

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tablespace issues (comment on ,moving indexes)
Date: 2004-08-10 06:43:14
Message-ID: 20040810064313.GE2544@filer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne wrote:
> >>Errr, unlike all the other uses for alter table and friends? ie:
> >>
> >>OWNER TO
> >
> >Which changes the attributes of the table...
>
> And indexes.

Sure. But not *just* indexes.

> >>RENAME TO
> >
> >Same.
>
> And indexes.

It does? I thought the indexes pointed to relations directly, not to
tables by name, and so changing the name of the table wouldn't have any
effect on the indexes, right?

> >>SET TABLESPACE
> >
> >Which again changes the attributes of the table..
>
> And indexes.

But it does change more than just the indexes.

But the context here is changing the tablespace of indexes independently
of the tablespace for the table. For that, how exactly does it affect
the table metadata? Not at all, I'd wager.

If you're going to go use ALTER TABLE to make changes to the attributes
of indexes, might I suggest that you also use ALTER TABLE to create and
destroy them as well? Otherwise you end up with an inconsistent language,
which is fine if the spec calls for it or if you somehow are attempting
to maintain compatibility with something. But what we're talking about
here is brand new functionality for which the language hasn't been
defined yet. It would be a bit unfortunate to introduce inconsistencies
where they're not needed, wouldn't you say?

--
Kevin Brown kevin(at)sysexperts(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2004-08-10 07:13:01 pg_autovacuum Win32 Service Code
Previous Message Manfred Spraul 2004-08-10 05:29:46 Re: fsync vs open_sync