Re: Using ALTER TABLESPACE in pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using ALTER TABLESPACE in pg_dump
Date: 2004-10-26 00:07:34
Message-ID: 2481.1098749254@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> Hmmm.. despite that problem, I was rather fond of schema default
> tablespaces because they allow DBAs to set a policy for a particular
> schema. The cases I've discussed with people so far are things
> like creating a schema for a (closed source) application and associating
> that with a tablespace. There by, all new objects created will be in that
> tablespace without the need for DBA intervention. Its not necessary, but
> its nice I think.

On the other hand, driving it from a GUC variable would allow you to
easily set a per-user default, which might be at least as useful.

>> It seems like we still need some notion of a database's schema, to put
>> the system catalogs in, but perhaps that need not be the same as the
>> default schema for user tables created in the database?

> By schema here, do you mean tablespace?

Sorry, fingers faster than brain obviously. Time to take a break...

> I think a viable solution is to go with the latter (ie, for CREATE TABLE
> foo(i int primary key) TABLESPACE ts; the index on i is created in
> default_tablespace). However, I might be nice to be able to specify the
> tablespace as part of the primary key clause. I say nice, but not
> necessary.

We already have that don't we?

create table foo (f1 int,
primary key (f1) using index tablespace its)
tablespace tts;

The question is where to put foo_pkey when "using index tablespace"
isn't there but "tablespace" is.

(BTW, since we stole that syntax from Oracle, maybe we should check what
they do...)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2004-10-26 00:25:46 Re: Using ALTER TABLESPACE in pg_dump
Previous Message Gavin Sherry 2004-10-26 00:01:04 Re: Using ALTER TABLESPACE in pg_dump