Re: Tablespace issues (comment on ,moving indexes) - Mailing list pgsql-hackers

From Kevin Brown
Subject Re: Tablespace issues (comment on ,moving indexes)
Date
Msg-id 20040810064313.GE2544@filer
Whole thread Raw
In response to Re: Tablespace issues (comment on ,moving indexes)  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: Tablespace issues (comment on ,moving indexes)  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@sysexperts.com


pgsql-hackers by date:

Previous
From: Manfred Spraul
Date:
Subject: Re: fsync vs open_sync
Next
From: "Dave Page"
Date:
Subject: pg_autovacuum Win32 Service Code