Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group