Обсуждение: Tablespaces

Поиск
Список
Период
Сортировка

Tablespaces

От
"CJ Combrink"
Дата:
Hi,

If I create a Database on a specified tablespace, will the tables etc
be placed in the same tablespace or do I need to specify it for each
creation.

I can set the default tablespace in the config file but that will be
for all databases. I want to have different databases on different
tablespaces.

Using PostgreSQL 8.4 on Ubuntu 10.04

Thank you,
Carel


This message and attachments are subject to a disclaimer. Please refer
to www.it.up.ac.za/documentation/governance/disclaimer/ for full
details. / Hierdie boodskap en aanhangsels is aan 'n vrywaringsklousule
onderhewig. Volledige besonderhede is by
www.it.up.ac.za/documentation/governance/disclaimer/ beskikbaar.


Re: Tablespaces

От
"A. Kretschmer"
Дата:
In response to CJ Combrink :
> Hi,
>
> If I create a Database on a specified tablespace, will the tables etc
> be placed in the same tablespace or do I need to specify it for each

Yes, in this tablespace. That's the default tablespace for all objects
within this database.


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

Re: Tablespaces

От
gargoyle60
Дата:
On Wed, 07 Jul 2010 11:58:26 +0200, s25291930@tuks.co.za ("CJ Combrink") wrote:

>Hi,
>
>If I create a Database on a specified tablespace, will the tables etc
>be placed in the same tablespace or do I need to specify it for each
>creation.
>
>I can set the default tablespace in the config file but that will be
>for all databases. I want to have different databases on different
>tablespaces.
>
>Using PostgreSQL 8.4 on Ubuntu 10.04
>
>Thank you,
>Carel
>

When using the CREATE TABLE statement, you can specify the TABLESPACE you want the table to reside
in. Other objects may depend on the table and/or tablespace and database organisation. There are
also other ways of targeting tables to a specifc tablespace - see the documentation files that
(should) get installed when you install PostgreSQL.

Gary