RE: Can we have multiple tablespaces with in a database.

From: Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
To: amul sul <sulamul(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: RE: Can we have multiple tablespaces with in a database.
Date: 2020-02-21 06:36:39
Message-ID: MN2PR01MB58548ED0C08B829131C1D3209B120@MN2PR01MB5854.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance


You mean we can have only single default tablespace for a database but the database objects can be created on different-2 tablespaces?

From: amul sul <sulamul(at)gmail(dot)com>
Sent: Friday, February 21, 2020 11:48 AM
To: Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org; pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Can we have multiple tablespaces with in a database.

On Fri, Feb 21, 2020 at 11:31 AM Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com<mailto:Daulat(dot)Ram(at)exponential(dot)com>> wrote:
Hi Amul ,
Please share the examples how we can create no. of tablespaces for a single database and how we can use them.
As I know we can create database on tablespace

1. CREATE TABLESPACE conn_tbs OWNER enterprisedb LOCATION '/mnt/pgdatatest/test/pgdata/conn_tbs';
2. Create database test tablespace ‘conn_tbs';
Maybe I have misunderstood your question; there is no option to specify more
than one tablespace for the database, but you can place the objects of that
database to different tablespaces (if options available for that object).
E.g. you can place a table in than conn_tbs tablespace.

If option is not specified then by default that object will be created
in conn_tbs.

Regards,
Amul

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 2020-02-21 06:36:42 Re: Can we have multiple tablespaces with in a database.
Previous Message Daulat Ram 2020-02-21 06:34:30 RE: Can we have multiple tablespaces with in a database.

Browse pgsql-performance by date

  From Date Subject
Next Message Christophe Pettus 2020-02-21 06:36:42 Re: Can we have multiple tablespaces with in a database.
Previous Message Daulat Ram 2020-02-21 06:34:30 RE: Can we have multiple tablespaces with in a database.