Re: make default TABLESPACE belong to target table.

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Amos Bird <amosbird(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: make default TABLESPACE belong to target table.
Date: 2016-11-25 13:07:48
Message-ID: CAB7nPqRB3daHp=5EXTH89nzue_aZsbC8qnygfhkCCSte0_TKsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 25, 2016 at 4:48 PM, Amos Bird <amosbird(at)gmail(dot)com> wrote:
> I've been using postgres for a long time. Recently I'm doing table
> sharding over a bunch of pgsql instances. I'm using multiple tablespaces
> one per disk to utilize all the IO bandwidth. Things went on pretty
> well, however there is a troublesome problem I have when adding
> auxiliary structures to sharded tables, such as Indexes. These objects
> have their storage default to the database's tablespace, and it's
> difficult to shard them by hand.
>
> I'd like to implement this small feature --- making table's auxiliary
> structures store their data to the target table's tablespace by default.
> I've done a thorough search over the mailing list and there is nothing
> relevant. Well I may miss some corners :-)

So you would like locate those index tablespaces into the same
tablespace as its parent relation when the index is created for a
unique index or as a primary key? Perhaps we could have a
session-level parameter that enforces the creation of such indexes on
the same tablespace as the table... But what would be the difference
with default_tablespace? I think that you are looking for a
replacement for something that is already doable.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-11-25 13:18:18 Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan
Previous Message Thomas Munro 2016-11-25 12:55:12 Re: Creating a DSA area to provide work space for parallel execution