pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daulat Ram <Daulat.Ram@exponential.com>
To: Christophe Pettus <xof@thebuild.com>
Cc: amul sul <sulamul@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: RE: Can we have multiple tablespaces with in a database.
Date: Fri, 21 Feb 2020 06:34:30 +0000
Message-ID: <MN2PR01MB58544AC29E182D7B35DE2DBC9B120@MN2PR01MB5854.prod.exchangelabs.com> (raw)
In-Reply-To: <802B6458-8F5B-4AA1-9A6C-3346538A0D46@thebuild.com>
References: <MN2PR01MB585418CEA8E057268F18339A9B120@MN2PR01MB5854.prod.exchangelabs.com>
	<CAAJ_b954ug=jYDvNUsnHj3j7yGt_p_nN31C7yDA8eafmOBcGOw@mail.gmail.com>
	<MN2PR01MB5854F35E70DF08D6B5DD4ECA9B120@MN2PR01MB5854.prod.exchangelabs.com>
	<CAAJ_b97HSMVhDvgRQX4XF64k_ACfKKwkZpeaSVF_CjeuPCF9+A@mail.gmail.com>
	<MN2PR01MB5854A53D30A32F75369688729B120@MN2PR01MB5854.prod.exchangelabs.com>
	<802B6458-8F5B-4AA1-9A6C-3346538A0D46@thebuild.com>

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

Can you please share the Doc URL for your suggestions given in trail mail.

Please correct me.

-----Original Message-----
From: Christophe Pettus <xof@thebuild.com> 
Sent: Friday, February 21, 2020 11:57 AM
To: Daulat Ram <Daulat.Ram@exponential.com>
Cc: amul sul <sulamul@gmail.com>; pgsql-general@lists.postgresql.org
Subject: Re: Can we have multiple tablespaces with in a database.



> On Feb 20, 2020, at 22:23, Daulat Ram <Daulat.Ram@exponential.com> wrote:
> 
> That will be great if you  share any doc where it’s mentioned that we can’t use multiple tablespace for a single database. I have to assist my Dev team regarding tablespaces.

A single PostgreSQL database can have any number of tablespaces.  Each table has to be in one specific tablespace, although a table can be in one tablespace and its indexes in a different one.

If a PostgreSQL table is partitioned, each partition can be in a different tablespace.

Oracle "style" tends to involve a lot of tablespaces in a database; this is much less commonly done in PostgreSQL.  In general, you only need to create tablespace in a small number of circumstances:

(a) You need more space than the current database volume allows, and moving the database to a larger volume is inconvenient;
(b) You have multiple volumes with significantly different access characteristics (like an HDD array and some SSDs), and you want to distribute database objects to take advantage of that (for example, put commonly-used large indexes on the SSDs).

PostgreSQL tablespaces do increase the administrative overhead of the database, and shouldn't be created unless there is a compelling need for them./

--
-- Christophe Pettus
   xof@thebuild.com



view thread (16+ messages)  latest in thread

Message-ID: <MN2PR01MB58544AC29E182D7B35DE2DBC9B120@MN2PR01MB5854.prod.exchangelabs.com>
Permalink:  ../MN2PR01MB58544AC29E182D7B35DE2DBC9B120@MN2PR01MB5854.prod.exchangelabs.com/
Also on:    postgresql.org/message-id/MN2PR01MB58544AC29E182D7B35DE2DBC9B120@MN2PR01MB5854.prod.exchangelabs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Daulat.Ram@exponential.com, xof@thebuild.com, sulamul@gmail.com, pgsql-general@lists.postgresql.org
  Subject: RE: Can we have multiple tablespaces with in a database.
  In-Reply-To: <MN2PR01MB58544AC29E182D7B35DE2DBC9B120@MN2PR01MB5854.prod.exchangelabs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox